Assignment Overview
Build an Employee Management System with a class hierarchy representing different employee types, each with unique salary calculations and behaviors.
Classes (5.1)
Encapsulation, constructors
Inheritance (5.2)
Class hierarchies, protected
Polymorphism (5.3)
Virtual functions, override
Operators (5.4)
Operator overloading
The Scenario
TechCorp HR System
TechCorp needs a system to manage employees: Full-time, Part-time, Contractors, and Managers. Each type has different salary calculations, benefits, and reporting requirements.
Requirements
Base Employee Class
Abstract class with name, ID, department. Pure virtual calculateSalary() and displayInfo().
Derived Employee Types
FullTimeEmployee (annual salary + benefits), PartTimeEmployee (hourly × hours), Contractor (daily rate × days), Manager (salary + bonus + team management).
Operator Overloading
Overload == (compare by ID), << (stream output), + (combine salaries for team reports).
Department Class
Manages collection of Employee pointers. Methods: add/remove employee, calculate total payroll, display all employees (polymorphism).
Main Application
Menu-driven interface to add employees, view by department, calculate payrolls, search by ID/name.
Submission
Required Repository Name
cpp-employee-system
cpp-employee-system/
├── Employee.h # Base class & derived declarations
├── Employee.cpp # Implementations
├── Department.h # Department class
├── Department.cpp # Department implementation
├── main.cpp # Main application
├── sample_output.txt # Sample run
└── README.md # Documentation
Grading Rubric
| Criteria | Points |
|---|---|
| Base Employee Class (abstract) | 40 |
| Derived Classes (4 types) | 60 |
| Polymorphism Implementation | 40 |
| Operator Overloading | 35 |
| Department Management | 35 |
| Main Application & UX | 20 |
| Code Quality & Documentation | 20 |
| Total | 250 |