class SchoolBus { public: SchoolBus(int seats, int seatedStudents); bool addStudents(int students); bool removeStudents(int students); int getStudents() const; private: int seats;…
class SchoolBus_x000D_ {_x000D_ public:_x000D_ SchoolBus(int seats, int seatedStudents);_x000D_ bool addStudents(int students);_x000D_ bool removeStudents(int students);_x000D_ int getStudents() const;_x000D_ _x000D_ private:_x000D_ int seats;_x000D_ int seatedStudents;_x000D_ };_x000D_
Figure 1
The declaration for the SchoolBus class is shown in Figure 1. Instances of the SchoolBus class represent school buses of varying sizes. The class provides functions to add and remove students. The add and remove functions return false and do not modify the state of the object if the operation can not be done exactly as requested. For example, if there are 3 empty seats and you try to add 5 students, then the addStudents function returns false and does not change the number of seated students. There is a single accessor function called getSeatedStudents, which returns the total number of students seated in the bus.
1) Draw the UML class diagram for the SchoolBus class given in Figure 1