import java.util.*;
public class DoWhile {
  
  
  public static void main(String[] args) { 
    Scanner s = new Scanner(System.in);
    String toContinue;
    do{
      System.out.println("Choose an option from 1 to 4: ");
      int choice = s.nextInt();
      
      switch(choice) {
        case 1:
           System.out.println("You chose 1");
           break;
        case 2:
           System.out.println("You chose 2");
           break;
        case 3:
           System.out.println("You chose 3");
           break;
        case 4:
           System.out.println("You chose 4");
           break;
        default:
           System.out.println("You chose "+choice+". Enter a new choice");
      }
      
      System.out.println("Would you like to go again: (yes to continue)");
      toContinue= s.next();
    }while(toContinue.toLowerCase().equals("yes"));
           
  }
  
  /* ADD YOUR CODE HERE */
  
  
  /*for(init step; test; update){
         //body
    }
    
    1. init step
    2. if the test is false stop.
    3. otherwise, run the body
    4. run the update
    5. go back to step 2
    
    while(test) {
      //body
    }
    1. if the test is false stop.
    2. otherwise, run the body
    3. go back to step 1
    
    do{
       //body
    }while(test);
    
    1. run the body (unconditionally)
    2. after the body is over, check the test to see if you should keep going
    
    
    do {
    //body
    }while(test);
    
    while(true) {
    
       //body
       
       if(!test)
       break;
    }
  */  
}
