Please help me with this in C++. THANK YOU!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please help me with this in C++. THANK YOU!

Develop a high-quality, object-oriented C++ program that performs a simulation using a heap implementation of a priority queue.

simulation creates a model of a real-world situation, allowing us to introduce a variety of conditions and observe their effects. For instance, a flight simulator challenges a pilot to respond to varying conditions and measures how well the pilot responds. Simulation is frequently used to measure current business practices, such as the number of checkout lines in a grocery store or the number of tellers in a bank, so that management can determine the fewest number of employees required to meet customer needs.

Airlines have been experimenting with different boarding procedures to shorten the entire boarding time, keep the flights on-time, reduce aisle congestion, and make the experience more pleasant for passengers and crew. A late-departing flight can cause a domino effect:

  • the departure gate is tied up and cannot be used by other landing or departing flights,
  • passengers on board the late flight may miss connecting flights and require rebooking and possibly overnight arrangements (meals and lodging), etc., and
  • passengers complain about being late, and/or about having to rearrange their plans.

Thus, late flights have a huge operational impact. 

For this assignment, we will simulate boarding procedures for Airworthy Airlines.  The Airline's current procedure is as follows: 

  • pre-board in the following order:
    • families with young children or people who need help (e.g., wheelchair)
    • first class and/or business class passengers
    • elite passengers (frequent fliers) and those passengers seated in exit rows
  • conduct general boarding in reverse, from the back of the plane to the front in the following order:
    • rows 23-26
    • rows 17-22
    • rows 11-16
    • rows 5-10

Airworthy is considering revising their boarding procedure such that general boarding is done randomly, meaning the first passenger in line for general boarding is the first passenger to board (i.e., general boarding passengers all have the same priority). Airworthy suspects this random general boarding method will improve the flow of passengers, getting them on board and seated more quickly. It is also less labor-intensive for Airworthy's customer service agents because it significantly reduces the number of boarding announcements required and eliminates confrontations with customers trying to board "out of turn."  Note that the revision is to general boarding only.  The pre-boarding procedures will not be changed.

 

HERE IS ONE OF THE ARIWORTHY70 FILE:

Whitley G 8
Knowles G 1
Rocha G 24
Boyle G 24
Wooten G 2
Forbes G 16
Vinson E 1
Valencia E 7
Lindsay E 16
Rasmussen E 5
Sargent G 11
Sosa G 23
Head G 3
Holcomb G 5
Carney G 4
Kirkland G 14
Levine E 9
Cash G 10
Kaufman G 6
Ratliff G 9
Macias G 4
Sharpe G 17
Sweet G 17
Delaney G 9
Emerson G 5
Castaneda E 9
Rutledge G 26
Stuart G 19
Rosales G 23
Baird G 2
Clemons G 8
Mcgowan G 18
Compton E 10
Albert G 15
Acevedo G 14
Mayer E 9
Fitzpatrick G 16
Chaney G 8
Jarvis G 3
Berger G 26
Britt E 11
Odonnell E 8
Levy E 9
Mullen G 6
Pollard G 22
Lott G 10
Cantrell G 15
Holder E 5
Vaughan E 11
Mccarty E 24
Wilder G 11
Mayo G 1
Pickett G 8
Sykes G 26
Bender G 13
Aguirre G 16
Bernard G 10
Hopper H 7
Melendez G 13
Macdonald H 18
Carver G 15
Gould E 26
Suarez G 6
Zamora G 15
Hinton G 13
Cabrera G 26
Dickson G 22
Salas G 24
Bentley G 13
Fuentes G 23
Terrell H 3
Holman E 7
Mcintyre G 16
Hebert G 13
Hendricks G 3
Jacobson G 14
Kline G 14
Faulkner G 5
Chan G 14
Mays G 1
Crosby G 25
Buck G 22
Maddox G 20
Buckley E 17
Kane G 10
Rivas E 26
Dudley G 22
Best G 12
Finley G 24
William G 18
Frost G 2
Ashley G 14
Mcconnell G 7
Blevins G 11
Middleton G 17
Bean G 18
Sheppard G 11
Estes E 7
Pugh G 8
Rivers E 6
Barr G 4
Landry E 10
Foley G 2

 

Develop an object-oriented C++ program that simulates these two boarding procedures using a heap implementation of a priority queue. Assume that all
passengers are already checked in and at the gate area when boarding begins for both scenarios. The simulation should model an Airbus A320-200 plane,
which is configured as follows:
- Rows 1 through 4 are first class seats (4 seats in each row)
. Rows 5 through 26 are coach class seats (6 seats in each row)
• Rows 10 and 11 are exit rows
Your program must consist of the ArrayMaxHeap class and the HeapException class from the class, the Passenger class and Airworthy class that you create,
and a separate file named SimulationProject.cpp that contains the main) method. When designing and implementing the program, apply good software
engineering principles. Create a makefile for the program. Be sure to follow the style guide and be sure to use Javadoc style comments appropriately.
Start the analysis and design process by drawing a complete UML class diagram for the program that includes the application and all the classes that are
contained in the program, including the classes provided by the textbook and the classes that you create. After you have completed the program, update the
UML class diagram to reflect the completed implementation.
The project uses the ArrayMaxHeap, the Heap Interface, and the Exception classes that we developed in class, along with input files for the program. Note
that the priority queue must store Passenger objects, and the > and < operators must be defined for that class because the ArrayMaxHeap class uses those
overloaded operators.
Develop a Passenger class that stores the following data for an Airworthy Airlines passenger:
• key - the priority value for the PriorityQueue
• passenger's last name
• passenger type, a character, where 'H' is a child or passenger who needs help in boarding. 'E is an elite passenger (frequent flyer), and 'G' is a general
boarding passenger
. row where passenger is seated; must be a number between 1 and 26, where rows 1-4 are first class and rows 10 and 11 are exit rows
Include a constructor and accessors and mutators for each attribute. In addition, you MUST include methods that overload the < and operators. You may
include other methods, if needed.
Develop an Airworthy class that contains the following data members:
. exactly one priority queue where the priority is set using Airworthy's previous boarding procedure
. exactly one priority queue where the priority is set using Airworthy's new random boarding procedure
• the amount of time, in seconds, required to board a plane using Airworthy's previous boarding procedure
. the amount of time, in seconds, required to board a plane using Airworthy's new random boarding procedure
You may use additional attributes, as needed. The Airworthy class must include methods to support the following functions of the class:
. a constructor
. read the data from the input file
• load the two priority queues
- run the simulation
Be sure to incorporate adequate error checking for all files and for the priority queue, providing error messages as needed. When setting the priority (Uhe
key) for a passenger, keep the pre-boarding procedure described above in mind.
When running the simulation, assume that:
· A passenger who is not blocked by another passenger requires one second to board.
.A passeneer is blocked when the previous passenger is sitting in the same row or a row closer to the front of the plane. A blocked passenger requires 25
seconds to board
Transcribed Image Text:Develop an object-oriented C++ program that simulates these two boarding procedures using a heap implementation of a priority queue. Assume that all passengers are already checked in and at the gate area when boarding begins for both scenarios. The simulation should model an Airbus A320-200 plane, which is configured as follows: - Rows 1 through 4 are first class seats (4 seats in each row) . Rows 5 through 26 are coach class seats (6 seats in each row) • Rows 10 and 11 are exit rows Your program must consist of the ArrayMaxHeap class and the HeapException class from the class, the Passenger class and Airworthy class that you create, and a separate file named SimulationProject.cpp that contains the main) method. When designing and implementing the program, apply good software engineering principles. Create a makefile for the program. Be sure to follow the style guide and be sure to use Javadoc style comments appropriately. Start the analysis and design process by drawing a complete UML class diagram for the program that includes the application and all the classes that are contained in the program, including the classes provided by the textbook and the classes that you create. After you have completed the program, update the UML class diagram to reflect the completed implementation. The project uses the ArrayMaxHeap, the Heap Interface, and the Exception classes that we developed in class, along with input files for the program. Note that the priority queue must store Passenger objects, and the > and < operators must be defined for that class because the ArrayMaxHeap class uses those overloaded operators. Develop a Passenger class that stores the following data for an Airworthy Airlines passenger: • key - the priority value for the PriorityQueue • passenger's last name • passenger type, a character, where 'H' is a child or passenger who needs help in boarding. 'E is an elite passenger (frequent flyer), and 'G' is a general boarding passenger . row where passenger is seated; must be a number between 1 and 26, where rows 1-4 are first class and rows 10 and 11 are exit rows Include a constructor and accessors and mutators for each attribute. In addition, you MUST include methods that overload the < and operators. You may include other methods, if needed. Develop an Airworthy class that contains the following data members: . exactly one priority queue where the priority is set using Airworthy's previous boarding procedure . exactly one priority queue where the priority is set using Airworthy's new random boarding procedure • the amount of time, in seconds, required to board a plane using Airworthy's previous boarding procedure . the amount of time, in seconds, required to board a plane using Airworthy's new random boarding procedure You may use additional attributes, as needed. The Airworthy class must include methods to support the following functions of the class: . a constructor . read the data from the input file • load the two priority queues - run the simulation Be sure to incorporate adequate error checking for all files and for the priority queue, providing error messages as needed. When setting the priority (Uhe key) for a passenger, keep the pre-boarding procedure described above in mind. When running the simulation, assume that: · A passenger who is not blocked by another passenger requires one second to board. .A passeneer is blocked when the previous passenger is sitting in the same row or a row closer to the front of the plane. A blocked passenger requires 25 seconds to board
The SimulationProject.cpp file contains a main) method and a method named description0 that provides a detailed description for the user, explaining what
the program is doing, how it works, and the location of all output files. Note that the description) method does NOT substitute for Javadoc comments. The
audience for the description) method consists of non-technical users who have no information at all about the program or the assignment. The main)
method must support the following:
1. call the description) method
2. call methods of the Airworthy class to load the priority queues and run the simulation using both the previous boarding procedure and the new random
boarding procedure for each of 3 different input files. Each input file contains, on each line, the last name of the passenger, the type of passenger, and
the row number in which the passenger is seated. The input files are:
• airworthy100.txt which loads the plane at 100% of capacity
• airworthy85.txt, which loads the plane at 85% of capacity
• airworthy70.txt, which loads the plane at 70% of capacity
3. call methods of the Airworthy class to create 3 different output files named results100.txt, results85.txt, and results70.txt. Each output file should
contain the data related to its similarly named input file. Be sure to title each part of the output and label all data so it is easy to identify. Each file should
contain:
· a list of each passenger read from the input file, showing the passenger's name, type, and row
. a list of each passenger in order as they are removed from the priority queue when running the simulation using the current boarding procedure,
showing the passenger's name, type, row, and priority value (the key)
. the total number of minutes (shown with 2 decimal places) required to board the plane using the current boarding procedure,
. a list of each passenger in order as they are removed from the priority queue when running the simulation for using the new random boarding
procedure, showing the passenger's name, type, row, and priority value (the key), and
• the total number of minutes (shown with 2 decimal places) required to board the plane using the new random boarding procedure.
Be sure to follow the Project Guidelines & Evaluation Criteria, since the project will be evaluated using this criteria. In addition, be sure to use javadoc-style
comments appropriately. When creating javadoc-style comments, keep in mind that the comment willeventually become part of an html file that will be
used by other programmers on yOur programming team, and by maintenance programmers. Remember also that maintenance programmers have not seen
the assignment (the specification), so the information you are providing here must provide all of the detailed information another programmer will need to
completely understand the program and to maintain the code.
Transcribed Image Text:The SimulationProject.cpp file contains a main) method and a method named description0 that provides a detailed description for the user, explaining what the program is doing, how it works, and the location of all output files. Note that the description) method does NOT substitute for Javadoc comments. The audience for the description) method consists of non-technical users who have no information at all about the program or the assignment. The main) method must support the following: 1. call the description) method 2. call methods of the Airworthy class to load the priority queues and run the simulation using both the previous boarding procedure and the new random boarding procedure for each of 3 different input files. Each input file contains, on each line, the last name of the passenger, the type of passenger, and the row number in which the passenger is seated. The input files are: • airworthy100.txt which loads the plane at 100% of capacity • airworthy85.txt, which loads the plane at 85% of capacity • airworthy70.txt, which loads the plane at 70% of capacity 3. call methods of the Airworthy class to create 3 different output files named results100.txt, results85.txt, and results70.txt. Each output file should contain the data related to its similarly named input file. Be sure to title each part of the output and label all data so it is easy to identify. Each file should contain: · a list of each passenger read from the input file, showing the passenger's name, type, and row . a list of each passenger in order as they are removed from the priority queue when running the simulation using the current boarding procedure, showing the passenger's name, type, row, and priority value (the key) . the total number of minutes (shown with 2 decimal places) required to board the plane using the current boarding procedure, . a list of each passenger in order as they are removed from the priority queue when running the simulation for using the new random boarding procedure, showing the passenger's name, type, row, and priority value (the key), and • the total number of minutes (shown with 2 decimal places) required to board the plane using the new random boarding procedure. Be sure to follow the Project Guidelines & Evaluation Criteria, since the project will be evaluated using this criteria. In addition, be sure to use javadoc-style comments appropriately. When creating javadoc-style comments, keep in mind that the comment willeventually become part of an html file that will be used by other programmers on yOur programming team, and by maintenance programmers. Remember also that maintenance programmers have not seen the assignment (the specification), so the information you are providing here must provide all of the detailed information another programmer will need to completely understand the program and to maintain the code.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY