For my assignment, we are currently coding a hotel booking system. For each room booked I want to make it so that a room that was previously available when selected is eliminated from the array. This is my array: availableRooms[38, 48, 64, 89, 110, 134, 224, 306, 402]
So pretty much it involves sequential file reading and writing and my mate who is like a Python Kami told me I should create a separate txt file as follows with 0 meaning available and 1 meaning unavailable:
0, 0, 0, 0, 0, 0, 0, 0, 0 when split = [0, 0, 0, 0, 0, 0, 0, 0, 0]
So if I were to pick room 38, the first zero in this array would turn into a 1 and it would remove said room from the availableNumbers array...I think.
If anyone is able to provide me with assistance or code in how to do so, your support would be greatly appreciated as the deadline for the assignment is nearing closer and closer.