Guest User

Stuff

a guest
May 21st, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Problem
  4. {
  5. public static void main(String[] args)
  6. {
  7. Scanner keyboard = new Scanner(System.in);
  8.  
  9. int choice = 1;
  10. while(choice > 0)
  11. {
  12. System.out.println("What would you like to do?");
  13. System.out.println("1) Enter a new list of words.");
  14. System.out.println("2) Find First and Last Alphabetical, and Longest and Shortest.");
  15. System.out.println("3) Show the current list of words.");
  16. System.out.println("0) Exit the Program.");
  17. System.out.print("> ");
  18.  
  19. choice = Integer.parseInt(keyboard.nextLine());
  20.  
  21. if(choice < 0 || choice > 3)
  22. {
  23. System.out.println("Invalid Command!");
  24. System.out.println(" ");
  25. continue;
  26. }
  27. else if(choice == 2)
  28. {
  29.  
  30. }
  31. else if(choice == 1)
  32. {
  33.  
  34. }
  35. }
  36. System.out.print("Goodbye!");
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment