This project builds on an inheritance example demonstrated in class, expanding it by introducing a new CEO class that inherits from the Manager class. The lab is designed to reinforce object-oriented principles in C++, including class inheritance, encapsulation, and modular file organization.
- Employee -Base class
- Manager - Inherits from
Employee, includes department details - CEO - Inherits from
Manager, adds a new attribute:shares - Main - Driver file to demonstrate functionality
- Demonstrates multilevel inheritance
- Proper encapsulation using getters and setters
- Modular code design with header (
.h) and implementation (.cpp) files for each class - Outputs object details using class-specific methods
Lab03/
- CEO.h
- CEO.cpp
- Manager.h
- Manager.cpp
- Employee.h
- Employee.cpp
- main.cpp
Enter CEO info: Name: Sara Al-Hachami Salary: 100000 Department: Tech Shares: 5000
CEO Name: Sara Al-Hachami Department: Tech Shares: 5000