Skip to content

[CODE]: Abstraction: Employee Management System #157

Description

@patil-rushikesh

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:

  1. Add a new employee (either full-time or part-time).
  2. Calculate salary for the employees.
  3. Display employee details.
  4. Exit the program.

Requirements for the Issue:

  1. Implement an abstract base class Employee.
  2. Create derived classes for FullTimeEmployee and PartTimeEmployee.
  3. Use pure virtual functions for calculateSalary().
  4. Provide a menu-driven interface to allow the user to manage employee records and calculate salaries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions