Quote (GetSpanked @ Sep 9 2013 10:04pm)
i have everything working but the last thing in the extra credit.
I need to ask if the buyer would like to place another order and if answered Y for yes, then the whole program loops, and if answered N for no, then the program terminates.
I also am not sure what he means by make a display menu. I just did a lot of System.out.print statements for all the categories.
to display the menu
Code
System.out.println("1)Student/n2)Alumni/n3)Falcuty & Staff/n4)Military/n5)General Public");
And for the bonus mark put everything inside your main method in a
Code
while(true)
loop. For example..
Code
while(true){
//your code goes here
//...
//...
//...
//then add these lines at the end of the while loop
System.out.println("Start again?");
char answer = new Scanner(System.in).next().charAt(0);
if(answer=='n'||answer=='N'){
System.exit(0);
}
}
for selecting the category...
Code
int category=0;
while(true){
System.out.println("1)Student/n2)Alumni/n3)Falcuty & Staff/n4)Military/n5)General Public");
category = new Scanner(System.in).nextInt();
if(category >5 || category < 1){
System.out.println("Invalid selection");
continue;
}else{
break
}
}
Hope there's no errors. I don't have an IDE installed.
This post was edited by labatymo on Sep 9 2013 08:17pm