Question: Create the class BusStop on the route at the defined position. There is a number of passengers increasing in time awaiting for the bus at
Create the class BusStop on the route at the defined position. There is a number of passengers increasing in time awaiting for the bus at the bus stop.
Create the class Bus. The bus has the capacity and number of passengers.
When the bus stops at the bus stop:
- random number of passengers goes out (no more than passengers in the bus)
- available passengers at the bus stop occupy available seats in the bus (do not exceed the capacity).
Define more classes, data members or methods, if necessary.
Use:
- pointers to the class objects,
- arrays of pointers to objects
- dynamic object creation
- passing the pointers to object (or references) as a parameters of methods
Step by Step Solution
There are 3 Steps involved in it
Class for BusStop class BusStop private int position position of the bus stop on the route int passe... View full answer
Get step-by-step solutions from verified subject matter experts
