Create the class BusStop on the route at the defined position. There is a number of passengers
Fantastic news! We've Found the answer you've been seeking!
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 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
Related Book For
Posted Date: