



Create a Java program that displays a menu of options about yourself:
1. My Education
2. My Hobbies
3. My Favorite Movies
4. Other
5. Quit
The program should end when the user selects Quit. Otherwise, the program should display content for each menu option the user selects. Post your source code here along with a screen capture showing your code’s execution.






More Options ...

Categories
Tag Cloud
Blog RSS
Comments RSS
Void (Default)
Life
Earth
Wind
Water
Fire
Lightweight
10:05 pm - April 5th, 2009
Originally posted: 8 Mar 09 3:43 PM MST
Here’s my code for this program:
/*/**@author RyanJB, Ryan Bridglal, http://www.RyanJB.com
*University of Advancing Technology
*CSC203-D09FEB05
*Professor Estabrook-Fishinghawk
*Week 2 Menu Demo Assignment, 03-06-09
*
* This program displays Information about Ryan.
* 1. My Education, 2. My Hobbies, 3. My Favorite Movies, 4. Other, 5. Quit*/
//the programs import package
import java.util.Scanner;
public class AboutRyan {
public static void main(String[] args) {
//initiates input
Scanner input = new Scanner( System.in );
//selection variable
int select;
//program loop and menu identifier.
do{
System.out.print(”This program contains a little information about Ryan.”);
System.out.print(”\n\n1. My Education”);
System.out.print(”\n\n2. My Hobbies”);
System.out.print(”\n\n3. My Favorite Movie Genre”);
System.out.print(”\n\n4. Other”);
System.out.print(”\n\n5. Quit”);
System.out.print(”\n\nPlease Make your selection:”);
select = input.nextInt();
//control the menu, displays information, case 5 exits program
switch (select){
case 1: System.out.print(”\n\nCurrently Attending UAT and Graduated Clark University.”); break;
case 2: System.out.print(”\n\nEverything Technology.”); break;
case 3: System.out.print(”\n\nAction, Drama, Thriller, Suspense and Comedy.”); break;
case 4: System.out.print(”\n\nGetting into the Gaming and Media Entertainment Industry.”); break;
case 5: System.out.print(”\n\nExiting.”); break;
}
}
while (select != 5);
}
}
Here’s my screen shot: Also ready my other post I could use some help with an issue.. this is my final submit, but the other post if for me to learn something extra; I need help with it.
10:07 pm - April 5th, 2009
10:08 pm - April 5th, 2009
Originally Posted: 8 Mar 09 3:46 PM MST
Hello, this is what I need help with:
Using the code above, the program runs great, but it automatically prints the menu. I wanted the program to pause after viewing number 1. I got the program to pasue with the following code added to my project:
char userInput = 0;
while(userInput!=1)
{
userInput=inputFunction();
private static char inputFunction() {
// TODO Auto-generated method stub
return 0;
}
BUT, I can’t get the program to resume back to the menu.
Can i use this code to pause a switch and resume to break?
Any help is appreciated.
10:08 pm - April 5th, 2009
I didn’t get a response to my question…. :-{