Using C++: Write a program that creates a Bus class that includes a bus ID number, number of seats, driver name, and current speed. Create a default constructor without any parameters that initializes the value of ID number, number of seats, and driver name. Create another constructor with three parameters of bus id number, number of seats, and driver name. Car speed should always be initialized as 0. The program will also include the member functions to perform the various operations: modify, set, and display bus information (Bus id, number of seats, driver name, and current speed). For example: - Set the bus id number - Set the number of seats - Set of driver number ---------------------------------------------------- - Return the bus id number by using get method
Using C++:
Write a
The program will also include the member functions to perform the various operations: modify, set, and display bus information (Bus id, number of seats, driver name, and current speed).
For example:
- Set the bus id number
- Set the number of seats
- Set of driver number
----------------------------------------------------
- Return the bus id number by using get method
- Return the number of seats
- Return of driver number
- Return the current speed
-----------------------
Member function to display the bus information
- busInformation()
Also write two member functions, Accelerate() and Brake(). Whenever Accelerate() is called, increase the speed by 5 (cannot exceed 50), and whenever Brake() is called, decrease the speed by 5 (cannot be negative). Write a program that declares several Bus objects and demonstrates that all the functions work correctly.

Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images









