title: If-Else program for days of the week
body: <p>I need help with homework. I need to write a program that will use if else statements instead of the switch statement shown:</p>
  
  <pre><code>switch (day) {
  case 1: case 2: case 3: case 4:
      message = "regular workday";
      break;
  case 6: case 7:
      message = "weekend";
      break;
  default:
      message = "tgif";
  }
  </code></pre>
  
  <p>I need to allow the user to key in the day of the week and then display the corresponding output. I also need to make sure it tests the input for a valid number (1-7). The user needs to be able to enter as many different days as they would like and to have a value (-1) end the program when entered.</p>
  
  <p>I have this so far:</p>
  
  <pre><code>public class Question1 {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          Scanner input = new Scanner(System.in);
          int day;
  
          do {
              System.out.println("What day of the week do you want to enter? When finished, please enter \"-1\".");
              day = input.nextInt(); //User input assigned to variable day
  
              if (day == 1 || day == 2 || day == 3 || day == 4) {
                  System.out.println("Regular workday");
              }
  
              else if (day == 6 || day == 7) {
                  System.out.println("Weekend");
              }
  
              else if (day == 5) {
                  System.out.println("TGIF"); 
              }   
  
              else {
                  System.out.println("Invalid Month. Please try again or enter \"-1\" when finished.");
              }
          } //end do
          while (day != -1); //Loops when input meets the criteria
      }
  
  } 
  </code></pre>
  
  <p>PROBLEM: The problem I am having is that when I enter -1 to end the program, it takes it as an else and prints the else statement when I simply just want the program to end.</p>