Using Android studio to create the mobile application and language used is in Java.
Make an application that calculates the occupancy rate for a hotel with eight floors. The user will be asked how many rooms are occupied on each floor. The program will iterate for each floor. Users must enter numbers and the rooms occupied on each floor cannot exceed 30. The occupancy rate is the number of occupied rooms/ unoccupied. The application also needs to display the occupancy for each individual floor as well. Each floor has a maximum of 30 rooms.
- Each time the user enters the occupancy for a single floor and clicks the Save button, the floor number in the Spinner should increment automatically and a new line should appear in the multiline text box with the percentage occupancy.
- The contents of the TextView (Number of Occupied Rooms) should clear automatically when the user clicks the Save button, so the user does not accidentally enter the same data twice in a row.
- The Reset button should clear all the appropriate controls on the form.
- The Exit button should end the application.
- Be sure to check for a non-integer value in the TextBox and notify the user if there is an error.
Ensure the same floor should not be entered more than one time.