0% found this document useful (0 votes)
18 views2 pages

OOP Exercise 2 PDF

The document outlines the development of a School Management System that manages details of Teachers, Students, and Staff Members through a class hierarchy. It specifies the creation of a base class 'Person' and derived classes for 'Student', 'Teacher', and 'Staff', each with unique attributes and methods for displaying their information. The main function will handle object creation, user input for additional students, and a menu-driven interface for data management.

Uploaded by

Ciara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

OOP Exercise 2 PDF

The document outlines the development of a School Management System that manages details of Teachers, Students, and Staff Members through a class hierarchy. It specifies the creation of a base class 'Person' and derived classes for 'Student', 'Teacher', and 'Staff', each with unique attributes and methods for displaying their information. The main function will handle object creation, user input for additional students, and a menu-driven interface for data management.

Uploaded by

Ciara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Scenario:

You are developing a School Management System that stores and displays details of Teachers,
Students, and Staff Members.

Each person has basic information (name, age, ID), but their roles differ, requiring specific
details for each type of person.

---

Subtasks:

1. Create a base class Person with:

Private attributes: name, age, ID.

A constructor to initialize these attributes.

A public method displayPersonInfo() to show general details.

2. Create a derived class Student that:

Inherits from Person.

Adds private attributes: grade and GPA.

Has a constructor to initialize all attributes.

A method displayStudentInfo() that calls displayPersonInfo() and shows grade and GPA.

3. Create a derived class Teacher that:

Inherits from Person.

Adds private attributes: subject and yearsOfExperience.

Has a constructor to initialize all attributes.


A method displayTeacherInfo() that calls displayPersonInfo() and shows subject and
yearsOfExperience.

4. Create a derived class Staff that:

Inherits from Person.

Adds private attributes: position and salary.

Has a constructor to initialize all attributes.

A method displayStaffInfo() that calls displayPersonInfo() and shows position and salary.

5. In main() function, create objects of Student, Teacher, and Staff and:

Display their details using their respective methods.

Create multiple predefined objects.

Allow the user to input details for additional students.

Store multiple objects in arrays (or vectors) and display all details using loops.

Use a menu-driven approach to allow the user to choose whether to add new data or exit.

You might also like