Question: Consider several classes declared in Program C-2. 1/ Program C-2 w #include using namespace std; 6 class Person string name; 8} 00 OO NO DO

 Consider several classes declared in Program C-2. 1/ Program C-2 w

Consider several classes declared in Program C-2. 1/ Program C-2 w #include using namespace std; 6 class Person string name; 8} 00 OO NO DO NNNNNNNN 10 class Teacher; // foward declaration 11 12 class Student : public Person 13 string matric; 14 Teacher teacher; 15 }; 16 17 class Office 18 string department; 19) 20 21 class Staff : public Person 22 string staffid; 23 Office office; 24 }; 25 26 class Teacher: public Staff 27 string expertise; 28 Student student; 29 a. Based on the program, determine what type of relationship do the following classes form? Note: Write No Relationship if they do not form any relationship to each other. i. Teacher and Student ii. Student and Office iii. Staff and Office iv. Teacher and Person (4 marks) b. Draw the UML class diagram for the program which includes all the classes and relationships between them. (11 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!