Problem Description:
Design an Employee Management System that allows for adding different types of employees (Full-Time, Part-Time) and calculating their salaries. Use abstraction to hide implementation details and only expose the necessary interface.
Location:
https://github.com/patil-rushikesh/cpp_programs/tree/main/Examples
Attributes:
Employee class (abstract class):
name (string) – Name of the employee.
employeeID (int) – Unique identifier for each employee.
salary (float) – Salary of the employee (to be calculated).
FullTimeEmployee class:
monthlySalary (float) – Monthly salary for full-time employees.
PartTimeEmployee class:
hourlyRate (float) – Hourly wage for part-time employees.
hoursWorked (int) – Number of hours worked in a given period.
Methods:
calculateSalary() – Abstract method in the Employee class to be overridden by derived classes to calculate salary.
The program should be menu-driven, allowing the user to:
- Add a new employee (either full-time or part-time).
- Calculate salary for the employees.
- Display employee details.
- Exit the program.
Requirements for the Issue:
- Implement an abstract base class Employee.
- Create derived classes for FullTimeEmployee and PartTimeEmployee.
- Use pure virtual functions for calculateSalary().
- Provide a menu-driven interface to allow the user to manage employee records and calculate salaries.
Problem Description:
Design an Employee Management System that allows for adding different types of employees (Full-Time, Part-Time) and calculating their salaries. Use abstraction to hide implementation details and only expose the necessary interface.
Location:
https://github.com/patil-rushikesh/cpp_programs/tree/main/Examples
Attributes:
Employee class (abstract class):
name (string) – Name of the employee.
employeeID (int) – Unique identifier for each employee.
salary (float) – Salary of the employee (to be calculated).
FullTimeEmployee class:
monthlySalary (float) – Monthly salary for full-time employees.
PartTimeEmployee class:
hourlyRate (float) – Hourly wage for part-time employees.
hoursWorked (int) – Number of hours worked in a given period.
Methods:
calculateSalary() – Abstract method in the Employee class to be overridden by derived classes to calculate salary.
The program should be menu-driven, allowing the user to:
Requirements for the Issue: