- Dec 6, 2001
- 2,171
- 1
- 0
Hey Everyone Thanks For Looking!
Here's my problem. I have to create a program that does the following:
Asks for the first number
Asks for the second number
Displays the menu
Gets user choice
Performs action based on the user choice
My Prof wants this in a very strange way as well and this is where im screwing up. I was going to generate a whole new source code but she wants me to previous programs i've written. I've created the three now stuck on building the program itself. For creating a loop that causes an exit she gave us this code and I have no idea how to complete it:
String userChoice=??;
while (the userChoice is not equal to ?7?){
ask the user for his choice
read choice from keyboard (here you might want to use in.getString());
if the userChoice equals 1, then perform the necessary action (in my case, my 1 corresponds to add so I used the following:
if(userChoice.equals(?1?)) math.add(first,second); //where first and second are the variable names for my first and second numbers entered by the user.
If interested here is the link if you guys could help me fill in the missing i'd be much appreciative.
Linky Poo
Here's my problem. I have to create a program that does the following:
Asks for the first number
Asks for the second number
Displays the menu
Gets user choice
Performs action based on the user choice
My Prof wants this in a very strange way as well and this is where im screwing up. I was going to generate a whole new source code but she wants me to previous programs i've written. I've created the three now stuck on building the program itself. For creating a loop that causes an exit she gave us this code and I have no idea how to complete it:
String userChoice=??;
while (the userChoice is not equal to ?7?){
ask the user for his choice
read choice from keyboard (here you might want to use in.getString());
if the userChoice equals 1, then perform the necessary action (in my case, my 1 corresponds to add so I used the following:
if(userChoice.equals(?1?)) math.add(first,second); //where first and second are the variable names for my first and second numbers entered by the user.
If interested here is the link if you guys could help me fill in the missing i'd be much appreciative.
Linky Poo
