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.

- Hint: Use .TryParse to validate number of rooms. The room number should between 0 and 30. - Hint: Near the end of Save button handler, increase comboBox floor number by 1 if comboBox selectedIndex value is less than the highest index number. - Overall room number variable (accumulator) should be declared in the global area (not to lose the current value whenever save button handler is executed). - Two big border boxes that hold multiple controls in them are GroupBox control - Containers group of Toolbox. The only property that should be entered is a Text property - you can visually control the size of the GroupBox that provides the borders.



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

More Books

Students also viewed these Databases questions

Question

How would you handle the difficulty level of the texts?

Answered: 1 week ago

Question

3. Contrast relational contexts in organizations

Answered: 1 week ago

Question

2. Describe ways in which organizational culture is communicated

Answered: 1 week ago

Question

1. Describe and compare approaches to managing an organization

Answered: 1 week ago