0
Need some help with a protect.
I need to Design a program for a Cruise Ship with twelve cabins. After I have created the cabins I need to create a menu (Simple enough). But then I need to allow the user to enter who is in 1 of the 12 cabins. This is where I'm a bit confused. How do i allow the user to add a name to the element in an array?
2 Answers
+ 2
Yousif Elhlange
If you have 12 cabins, then you could use the index of the array to identify your occupant, or to assign your occupant to that array index/cabin.
You could also use a multidimensional array if you wished to capture more info about the occupents of each cabin.
All this info is available in the Java course.
0
Just to clarify the user need to press a certain Key in the menu. Like V then pick which cabin to edit. Then rewrite that. I just don't understand how to connect all that data.