class SchoolBus { public: SchoolBus(int seats, int seatedStudents); bool addStudents(int students); bool removeStudents(int students); int getStudents() const; private: int seats;...
class SchoolBus
{
public:
SchoolBus(int seats, int seatedStudents);
bool addStudents(int students);
bool removeStudents(int students);
int getStudents() const;
private:
int seats;
int seatedStudents;
};
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
11 years ago
999999.99
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

NOT RATED
- uml.docx
Bids(0)
other Questions(10)
- False Memories
- MN 504 week 3 topic 2
- The XYZ Company
- The Deepwater Horizon Oil Spill
- Unit 7: The Community Stakeholder - Discussion
- Foreign Direct Investment
- Determine the magnitude of the force Fâ 2 (-300 N, -400 N).
- for REY WRITER
- Film response paper-questions (Arabic cinema class) 2
- Accounting discussion post