Check a list , true false
Hello, I'm in desperate need of some quick help! ;D
Let's say I have a hotel, and I want to check what rooms are available, simple true or false.
I have 4 rooms on each floor, and 4 floors. Let's just call them floor A,B,C,D and room A1,A2 etc..
How whould someting like this look like, and how do I change the value (true or false) of one specific room?
Re: Check a list , true false
It depends on how you have your rooms arranged. You could use either a 4 x 4 array, a List of Lists, or a Map. Then you just use the appropriate technique to access the desired element in the data structure (aka, room) and change its status.