Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The ElGrande Hotel has 8 floors and 30 rooms on each floor. Create an application that calculates the occupancy rate for each floor, and the

The ElGrande 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 first floor are occupied, the occupancy rate is as follows:

18 / 30 = 0.6 or 60%

On startup, the applications form should appear similar to the one shown below. Each time the user enters the occupancy for a single floor and clicks the Save button, the floor number in the 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. The Exit button should end the application.


SHOW LABELS AND VISUAL STUDIO CODE
PLEASE HELP
image text in transcribed
OcccupenniyfioteCalculator - OccupanncyRateCalculator Formt If (tint. Tryparse(txtRoonsoccupied. Text, out roonsoccupied) II roonsoccupied 30 ). MessageBox. Shon("Invalid input, Nuaber of roons occupied shoutd be between 0 and 30,7 ; b return: overatlRoons t roonsoceupied; float oecupancypate = (float) roomsoccupied /30; for (int 1=1;1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

Explain why households do not hold diversified portfolios.

Answered: 1 week ago