Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java program and outputs to a text pad CANADA'S MONTHLY HOTEL OCCUPANCY REACHES BC ACCOMMODATION BENCHMARKING REPORTS ALL-TIME HIGH IN PANDEMIC ERA, REPORTS STR How

java program and outputs to a text pad

image text in transcribedimage text in transcribedimage text in transcribed

CANADA'S MONTHLY HOTEL OCCUPANCY REACHES BC ACCOMMODATION BENCHMARKING REPORTS ALL-TIME HIGH IN PANDEMIC ERA, REPORTS STR How many floors does the hotel have? 4 How many rooms does floor 1 have? 9 Invalid. Enter 10 or more: 10 How many occupied rooms does floor 1 have? 5 How many rooms does floor 2 have? 12 How many occupied rooms does floor 2 have? 3 How many rooms does floor 3 have? 15 How many occupied rooms does floor 3 have? 9 How many rooms does floor 4 have? 15 How many occupied rooms does floor 4 have? 6 Hotel Occupancy Report Number of rooms: 52 Occupied rooms: 23 Vacant rooms: 29 Floor Rooms Occupied rooms Occupancy rate: 44.23% Report written to OccupancyReport.txt. OccupancyReport.txt Lab 3: Hotel Occupancy Report 1. Design a Java program (e.g., (or Restaurant Occupancy) hotelOccupancy_yourLastnameFirstnamelnitial.java) to generate a txt showing hotel occupancy report. This report must include following mechanism; How many floors does the hotel have? 4 a) User input: How many rooms does floor 1 have? 9 - Ask a user to enter a number of floors, rooms per floor, and occupied Invalid. Enter 10 or more: 10 rooms for each floor. How many occupied rooms does floor 1 have? 5 - You program must not accept a value less than 1 for the number of How many rooms does floor 2 have? 12 How many occupied rooms does floor 2 have? 3 floors. How many rooms does floor 3 have? 15 - Do not accept a number less than 10 for the number of rooms on a How many occupied rooms does floor 3 have? 9 floor. How many occupied rooms does floor 4 have? 6 Number of rooms: 52 b) Find an occupancy rate based on the formula; Occupied rooms: 23 - Occupancy rate = Number of rooms occupied / Total number of Vacant rooms: 29 rooms Occupancy rate: 44.23% 2. Generate OccupancyReport_yourLastnameFirstnamelnitial.txt. a) This output file must show floor numbers, rooms in each floor, and occupied rooms. b) Display totals of rooms, occupied rooms and vacant rooms. c) Show the occupancy rate. - Submit one zip file (Lab03_yourLastnameFirstnamelnitial.zip) containing both java file and txt file. - Feel free to explore other scenario (e.g., restaurant seating occupancy, game room etc.)

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago