I have a question about how to do item 1 in the menu, if anyone can explain me, I would appreciate it a lot :)
Faculty X thought of adopting lockers for students to leave their materials in the same way as American universities. With that, she thought of Computer Engineering students to assemble the automation of this system. To test the system you will have to control 10 cabinets. Mount a menu of options that will be displayed on a control display as shown below and implement the routines so that each menu option works correctly:
MENU
1 - Show the situation of all the cabinets, for example: Wardrobe 0: Busy, Wardrobe 1: Busy, Wardrobe 2: Free ...
2 - Show the free cabinets, eg: Cabinet 2, Cabinet 4, Cabinet 8 ...
3 - Use Cabinet: Inform the number of a free cabinet and mark it as occupied, if the cabinet is occupied, notify the user CABINET BEING USED.
4 - Remove Cabinet: Inform the number of a occupied cabinet and release the cabinet, if the cabinet is free to notify the user CABINET IS NOT USED.
5 - Cabinet Summary, example: 3 Free Lockers, 7 Lockers
0 - Exit
Remarks: The program should start with all free cabinets and the menu should be in infinite loop, ie after choosing any option should always return to the menu. The menu should handle invalid options.