Moving and shaking! We're going to create a program that movestrains carrying cargo and buses carrying people.
Question:
Moving and shaking! We're going to create a program that movestrains carrying cargo and buses carrying people.
Trains and buses are "transporters". Any transporter MUST beable to be loaded with oneitem, unloaded with oneitem, empty-ed of allitems, moved. They must also be able toreport back whether or not they areempty and how manyitems they are carrying.
Additionally while a train and abus must be able to store items of anytype, in this project a train shouldstore cargo and a bus shouldtransport people. When cargo is loaded onto a train,it doesn't matter where it goes but people on the bus should "sit"from shortest to tallest. Also, a train must be able to report onthe weight of all its cargo and a bus must be able to change itsfair and give the total fair for all the people on the bus. When atrain moves, it can display that it's reached the next destination.When a bus moves, it can display that it's reached the nextstop.
Finally, each cargo must have a type and a weight and eachperson must have a name and a height.
The main driver of your program must create a train and load itwith some cargo. It must also create a bus and let people board.All console input and output should occur in the main function(except for what's displayed in the move functions).