Assignment 5-A

Employee Management System

Design a comprehensive employee management system using classes, inheritance hierarchies, polymorphism, and operator overloading to manage different employee types.

8-10 hours
Intermediate
250 Points
Submit Assignment
What You'll Practice
  • Class design & encapsulation
  • Inheritance hierarchies
  • Virtual functions & polymorphism
  • Operator overloading
  • Abstract classes & interfaces
01

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

02

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.

03

Requirements

1
Base Employee Class

Abstract class with name, ID, department. Pure virtual calculateSalary() and displayInfo().

2
Derived Employee Types

FullTimeEmployee (annual salary + benefits), PartTimeEmployee (hourly × hours), Contractor (daily rate × days), Manager (salary + bonus + team management).

3
Operator Overloading

Overload == (compare by ID), << (stream output), + (combine salaries for team reports).

4
Department Class

Manages collection of Employee pointers. Methods: add/remove employee, calculate total payroll, display all employees (polymorphism).

5
Main Application

Menu-driven interface to add employees, view by department, calculate payrolls, search by ID/name.

04

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
05

Grading Rubric

CriteriaPoints
Base Employee Class (abstract)40
Derived Classes (4 types)60
Polymorphism Implementation40
Operator Overloading35
Department Management35
Main Application & UX20
Code Quality & Documentation20
Total250