# 1shivansh18/employee-payroll-system architecture

> Architecture diagram of the GitHub repository 1shivansh18/employee-payroll-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/1shivansh18/employee-payroll-system
- Repository: https://github.com/1shivansh18/employee-payroll-system

## Overview

This is a small Java console payroll demo. Its workflow creates full-time and part-time employees, adds them to an in-memory payroll list, displays their salary-bearing details, and removes an employee by ID. Salary calculation is polymorphic: full-time employees return a monthly amount, while part-time employees multiply hours by their hourly rate. The README also advertises record retrieval and salary slips, but the inspected implementation only displays employee details; no separate persistence or slip-generation component is present.

Main entry points: [`EMPLOYEE PAYROLL SYSTEM/src/Main.java`](https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java) (Main Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Console Application"]
  node_main["Main Demo<br/>[Main.java]"]
  node_payroll["Payroll System<br/>[Main.java]"]
end

subgraph group_domain["Payroll Domain"]
  node_employee["Employee<br/>[Main.java]"]
  node_fulltime["Full-Time Employee<br/>[Main.java]"]
  node_parttime["Part-Time Employee<br/>[Main.java]"]
end

node_user(("Console User"))

node_main -->|"creates and manages"| node_payroll
node_main -->|"adds and removes"| node_payroll
node_main -->|"requests display"| node_payroll
node_payroll -->|"stores and iterates"| node_employee
node_fulltime -->|"extends"| node_employee
node_parttime -->|"extends"| node_employee
node_user -->|"runs demo"| node_main
node_main -->|"prints details"| node_user

click node_main "https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java"
click node_payroll "https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java"
click node_employee "https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java"
click node_fulltime "https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java"
click node_parttime "https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_payroll,node_user toneBlue
class node_employee,node_fulltime,node_parttime toneAmber
```

## Components

### Console Application

- [Main Demo](https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java): `EMPLOYEE PAYROLL SYSTEM/src/Main.java`
- [Payroll System](https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java): `EMPLOYEE PAYROLL SYSTEM/src/Main.java`

### Payroll Domain

- [Employee](https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java): `EMPLOYEE PAYROLL SYSTEM/src/Main.java`
- [Full-Time Employee](https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java): `EMPLOYEE PAYROLL SYSTEM/src/Main.java`
- [Part-Time Employee](https://github.com/1shivansh18/employee-payroll-system/blob/main/EMPLOYEE%20PAYROLL%20SYSTEM/src/Main.java): `EMPLOYEE PAYROLL SYSTEM/src/Main.java`

### Other components

- **Console User**

## Connections

- Main Demo → Payroll System: creates and manages (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
- Main Demo → Payroll System: adds and removes (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
- Main Demo → Payroll System: requests display (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
- Payroll System → Employee: stores and iterates (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
- Full-Time Employee → Employee: extends (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
- Part-Time Employee → Employee: extends (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
- Console User → Main Demo: runs demo (evidence: `README.md`)
- Main Demo → Console User: prints details (evidence: `EMPLOYEE PAYROLL SYSTEM/src/Main.java`)
