Homework 5

~/2020_S19/wk5/hw5.cpp

The purpose of this assignment is to practice aggregation, inheritance, and polymorphism. You will use the given Person, Faculty, and Student classes and alter the definitions to add polymorphic behavior. In addition, you will write an Abstract Base Class called 'CourseInterface' (parent), a derived 'Course' class (child), and two derived-derived classes called 'Lecture' and 'Lab' (grand children). The description of the classes are listed below. Function main will also be given to you with a ClassInfo class.

hw5.cpp main

CourseInterface (Abstract Base Class)

This class will contain pure virtual member functions for the derived class's public interface. In addition to protected member variables: a statically sized cstring for 'title' and 'type', a Faculty object 'lecturer', a PersonStudent pointer 'roster', and an integer for 'count' number of students enrolled, and and integer for 'capacity'.


Course (Derived)

This class will inherit from CourseInterface publically.


Lecture (Derived-Derived)

This class will inherit from Course publically


Lab (Derived-Derived)

This class will inherit from Course publically, and will contain one Faculty member object 'labInstructor'.


CourseInfo

This class definition is given to you. Aggregation is the instance of a class within another class ("has a" relationship). A CourseInfo object will contain an instance of a Lecture and a Lab object.


~/2020_S19/wk5/hw5.cpp
Be sure that the directory name and file name are exact!