Overview The objective of this assignment is to demonstrate an ability to implement inheritance, composition, and overloaded operators in a program. This program leverages many of the concepts that you have learned in this class and combines them into a professional-s
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Overview
The objective of this assignment is to demonstrate an ability to implement inheritance, composition, and overloaded operators in a program. This program leverages many of the concepts that you have learned in this class and combines them into a professional-style program.
Instructions
Classes are getting to be more realistic with each programming assignment. This assignment includes the valuable aspect of inheritance to facilitate reuse of code and operator overloading to allow the usage of familiar operators tailored specifically to the Person, Student, and Faculty classes. Composition is also demonstrated in the use of a Course class that contains objects of the Student and Faculty classes.
You are working in the IT department for a university and have been tasked with developing an application that will manage the registration process, which involves the creation of a course, the enrollment of students in the course, and the assignment of faculty members to teach the course.
You will need to create several classes to maintain this information:
Course, Person, Student, Faculty, and Date.
The characteristics of Students and Faculty are shown below:
Students: Faculty:
ID (string) ID (string)
First Name (string) First Name (string)
Last Name (string) Last Name (string)
Birthdate (Date) Birthdate (Date)
Date enrolled (Date) Date hired (Date)
Major (string) Title (string)
Level (string) (i.e. Freshman, Sophomore…) Rank (string)
GPA (double) Salary (double)
Several of the data members above require the use of dates. Strings will not be acceptable substitutes for date fields.
Person class (base class)
The Person class should contain data members that are common to both Students and Faculty.
Write appropriate member functions to store and retrieve information in the member variables above. Be sure to include a constructor and destructor.
Student class and Faculty class. (derived classes)
Both the Student and Faculty classes should be derived from the Person class. Each should have the member variables shown above that are unique to each class. The data members that are common to both classes should be inherited from the Person class.
In each derived class, the << operator should be overloaded to output, neatly formatted, all of the information associated with a student or faculty member.
The < operator should be overloaded in the Student class to enable sorting of the
Write member functions to store and retrieve information in the appropriate member variables. Be sure to include a constructor and destructor in each derived class.
Course class
The Course class has a name data member (i.e. a course’s name might be “CSIS 112”).
The class contains a Faculty object that represents the Faculty member assigned to teach the class.
The class contains a vector of Student objects that represent the students enrolled in the class.
The class has an integer variable, capacity, that represents the maximum number of students that can be enrolled in the class.
The Course class should support operations to assign a faculty member to the course, enroll students in the course, and list all of the course information, including its name, capacity, instructor, and students enrolled in it.



Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images









