Question: 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

java program and outputs to a text pad CANADA'S MONTHLY HOTEL OCCUPANCYREACHES BC ACCOMMODATION BENCHMARKING REPORTS ALL-TIME HIGH IN PANDEMIC ERA, REPORTS STRHow many floors does the hotel have? 4 How many rooms does

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!