subject
Engineering, 13.09.2019 00:20 ajbrock1004

Introduction
zettaair airlines had only one plane with only 3 seats for passengers. the company needed a computer program to book passengers, or if the plane was fully booked, to add customers to a waiting list (also 3 long).
program description
your program will display (see the sample output) the following menu at startup and will continue to do so, after it executes the user's choice to add, delete or show passengers, until the user chooses exit, which of course exits the program.
menu

1. add passenger
2. delete passenger
3. show passengers
4. exit
enter choice:
the program maintains two lists, which as explained below are both queues. the first is for booked passengers. since the plane has only 3 seats for passengers, only 3 passengers can be on this list. the second is the waiting list. zettaair's policy is not to have more than 3 customers on the waiting list; anyone else is told to try again later.
adding
you add a customer to the list of booked passengers unless that list is full (3 booked passengers). if it is, then you add the customer to the waiting list unless that list also is full (maximum size of waiting list is 3). if so, you tell the customer sorry, try again later. each passenger is added in order.
deleting
if there are any booked passengers, then you delete the first passenger on that list. next, if there are any customers on the waiting list, you add the first customer on the waiting list to the list of booked passengers, and of course take that customer off the waiting list.
if there are no booked passengers, then there is no one to delete (if there are no booked passengers there can't be any customers on the waiting list).
showing a passenger
see the sample output. if there are any booked passengers, then you list them in order. you then list in order any customers on the waiting list unless there are none, in which case you advise there is no one on the waiting list.
if there are no booked passengers, then there is no one to show (if there are no booked passengers there can't be any customers on the waiting list), so you advise there are no booked passengers.
queue class
both the booked passenger list and the waiting list are queues. since deletions are permitted, each queue will be implemented by a circular or ring queue. this concept is explained in the book and in module #4 (queue).
you will write the queue as a class. module #4 (queue) explains the member variables and member functions, including a constructor.
files
the class will be written using header and implementation files. your program also will include a driver file, so your multi-file project will have these three files and no others:
file name purpose
cqueue. h header file for queue
cqueue. cpp implementation file for queue
test. cpp driver file
your job
the code/output handout provides all the code for the cqueue. h file (except the value of one constant) and the test. cpp file except the implementation of the add, delete and show functions. your job is to complete those two files and write the cqueue. cpp file.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Explain the difference laminar and turbulent flow. explain it with the shear stress and the velocity profiles.
Answers: 1
question
Engineering, 03.07.2019 14:10
If the thermal strain developed in polyimide film during deposition is given as 0.0044. assume room temperature is kept at 17.3 c, and thermal coefficient of expansion for the film and the substrate are 54 x 10^-6c^-1 and 3.3 x 10^-6c^-1respectively. calculate the deposition temperature.
Answers: 3
question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
You know the right answer?
Introduction
zettaair airlines had only one plane with only 3 seats for passengers. the compa...
Questions
Questions on the website: 13722367