Write a Java procedural program that helps organise travellers with a specific travel company arriving at an airport, telling them which queue to join based on their hotel. The program asks each traveller what their hotel is (the choices are the Seaview for which they need to join Queue 1, the Majestic for which they need to join Queue 4 and the Grand for which they need to join Queue 7) and tells them the right queue. There are 1330 travellers with the tour company and each will use the program as they arrive. After all have indicated their hotel, the program then prints the percentage in each hotel. * See image for an example run of the program. Percentages should be printed truncated to two decimal places. Do this using a method you write yourself that multiplies by 100, converts to an integer then divides by 100.  * must make use of a counter-controlled for loop, be in procedural programming style (not OOP)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a Java procedural program that helps organise travellers with a specific travel company arriving at an airport, telling them which queue to join based on their hotel. The program asks each traveller what their hotel is (the choices are the Seaview for which they need to join Queue 1, the Majestic for which they need to join Queue 4 and the Grand for which they need to join Queue 7) and tells them the right queue. There are 1330 travellers with the tour company and each will use the program as they arrive. After all have indicated their hotel, the program then prints the percentage in each hotel.

* See image for an example run of the program. Percentages should be printed truncated to two decimal places. Do this using a method you write yourself that multiplies by 100, converts to an integer then divides by 100. 

* must make use of a counter-controlled for loop, be in procedural programming style (not OOP)

 

Next please:
Welcome traveller 1: what is your hotel? Grand
You must join Queue 7.
Next please:
Welcome traveller 2: what is your hotel? Grand
You must join Queue 7.
Next please:
Welcome traveller 3: what is your hotel? Seaview
You must join Queue 1.
Next please:
Welcome traveller 4: what is your hotel? Majestic
You must join Queue 4.
...
Next please:
Welcome traveller 1328: what is your hotel? Grand
You must join Queue 7.
Next please:
Welcome traveller 1329: what is your hotel? Majestic
You must join Queue 4.
Next please:
Welcome traveller 1330: what is your hotel? Grand
You must join Queue 7.
25.39% of travellers are staying in the Seaview.
25.49% of travellers are staying in the Majestic.
49.12% of travellers are staying in the Grand.
Transcribed Image Text:Next please: Welcome traveller 1: what is your hotel? Grand You must join Queue 7. Next please: Welcome traveller 2: what is your hotel? Grand You must join Queue 7. Next please: Welcome traveller 3: what is your hotel? Seaview You must join Queue 1. Next please: Welcome traveller 4: what is your hotel? Majestic You must join Queue 4. ... Next please: Welcome traveller 1328: what is your hotel? Grand You must join Queue 7. Next please: Welcome traveller 1329: what is your hotel? Majestic You must join Queue 4. Next please: Welcome traveller 1330: what is your hotel? Grand You must join Queue 7. 25.39% of travellers are staying in the Seaview. 25.49% of travellers are staying in the Majestic. 49.12% of travellers are staying in the Grand.
Expert Solution
Step 1

Table must contain the details of the passengers, each table has the following attributes:

Computer Science homework question answer, step 1, image 1

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education