hi I am designing a program but need some advise, was wondering if I can put a switch in a switch or a switch and then a else if in it see below for where i am trying to go.
menu view to user
1. change bus driver
2. change bus status
3 change bus destination
java idea from selection(please note there is 3 different buses)
so if user chooses option 1 can i do this
and then similar questions for destination and status in case3case 1 System.out.println("please select bus Number "); busNumber = input.nextInt(); if (busNumber ==1) System.out.println("Enter driver 1 name ") name1= input.next(); name1 = name[0]; else if (busNumber ==2) System.out.println("Enter driver 2 name ") name2= input.next(); name2 = name[1]; else (busNumber ==3) System.out.println("Enter driver 3 name ") name3= input.next(); name3 = name[2]; case2
i will also have a case 4 but the instruction there will be just to print all the details inputted
If I cant do this then how can i do it and will i need to bunch all cases and else ifs in one set of {} or several
your help and input is much appreciated