Design classes in object oriented programming
Learning object oriented programming? Want to design a class? Find response from experts on this page.
Design a class 'university'. It has name and place as data members. Their member functions are for printing and getting data members. Derive 'department' class from 'university' class protected. Its data members are department name, no. of students, and number of staff. Member functions are for getting and printing data members. Derive one more class 'staff' from 'department', data members are name of staff, salary, experience (in years) and subject. Another class student is derived from 'department' as 'student'. Data members are name of student, years of course and total marks. These two classes are derived from parent class in private mode. Experts: Can you provide a C++ program for implementing the above scenario.