In South Africa, buses are used as one of the main transport services for people in the country. Everyday, thet follow the same route from a particular town/city/shopping complex etc., to another location point.
Create an application that uses a recursive function to:
- Allow the bus driver to accept payments from passengers.
-Check every bus stop to ensure that it knows whether or not a passenger should still be in bus or off.
The system should:
-use a recursive function to keep accepting passengers in each bus stop until the second last stop.
-be aware of how many stops are left.
Assume that there are seven bus stops from the starting point to the last point.(excluding the starting and the last point)
Comments
Leave a comment