Use Visual Basic
Page Hotel Occupancy The Hotel has 8 Floors and 30 rooms on each floor. Create an application that calculates the occupancy rate for each floor, and the overall occupancy rate for the hotel. The occupancy rate is the percentage of rooms occupied, and may be calculated by dividing the number of rooms occupied by the number of rooms. For example, if 18 rooms on the 1t floor are occupied, the Occupancy Rate is as follows: 18/30-0.6 or 60% For the Overall Occupancy Rate, using the above example, 18/(8*30)--0.075 or 7.5% Another example for Overall Occupancy Rate If 1st floor, 18 rooms occupied. 2nd floor, 30 rooms occupied, then the calculation is (18+30)/(8*30) or(18+30)240-0.2 or 20% You will need to use Name Constants for Rooms (30 rooms), and Floors (8 floors). Some variables and Constants you will need to declare in class level to do the Overall Total and Overall Oecupancy Rate calculation Some variables you will need to use in the local level The application's form should appear similar to the one shown below. In the form load event handler, use a loop to populate floor 1 to 8 in combo box. Do NOT create floor 1 to 8 at design time) On startup, "Select the floor" combo box should default to floor 1. Each time the user enters the occupancy for a single floor and clicks the Save button, the floor number in the Drop-Down List ComboBox should increment automatically (just add 1 to its SelectedIndex property), and a new line should appear in the ListBox with the percentage occupancy. Also, the contents of the TextBox at the top of the form 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 Restart button should clear all the appropriate controls on the form. "Select the floor" combo box should default to floor l The Exit button should end the application. The Save button should do all input validation and all other calculations. (Do NOT use a loop in ere