# hungvv109/techviet-hr-payroll architecture

> Architecture diagram of the GitHub repository hungvv109/techviet-hr-payroll, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hungvv109/techviet-hr-payroll
- Repository: https://github.com/hungvv109/techviet-hr-payroll

## Overview

TechViet is a small console-based employee and payroll application. The user selects an operation in Main: create or find/remove employees, view or sort the roster, calculate payroll, identify the highest-paid employee, or print a tax report. Company manages the in-memory employee list and delegates salary calculations to employee types; the report uses TaxCalculator through the taxable interface. Evidence is limited to the supplied tree and source excerpts; the README is empty.

Main entry points: [`src/Main.java`](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Main.java) (Menu and input), [`src/Company.java`](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Company.java) (Roster and payroll), [`src/Employee.java`](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Employee.java) (Employee base), [`src/Manager.java`](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Manager.java) (Manager employee)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Console interface"]
  node_main["Menu and input<br/>[Main.java]"]
end

subgraph group_payroll["Employee management"]
  node_company["Roster and payroll<br/>[Company.java]"]
  node_employee["Employee base<br/>[Employee.java]"]
end

subgraph group_compensation["Salary and tax"]
  node_fulltime["Full-time employee"]
  node_parttime["Part-time employee"]
  node_manager["Manager employee<br/>[Manager.java]"]
  node_taxable["Taxable interface<br/>[Taxable.java]"]
  node_taxcalculator["Progressive tax<br/>[TaxCalculator.java]"]
end

node_user(("Console user"))

node_user -->|"selects operation"| node_main
node_main -->|"prompts and displays"| node_user
node_main -->|"manages roster"| node_company
node_main -->|"creates employee"| node_fulltime
node_main -->|"creates employee"| node_parttime
node_main -->|"creates employee"| node_manager
node_company -->|"stores and processes"| node_employee
node_company -->|"calculates displayed tax"| node_taxable
node_taxable -->|"delegates tax"| node_taxcalculator
node_employee -->|"extends"| node_company
node_fulltime -->|"extends"| node_employee
node_parttime -->|"extends"| node_employee
node_manager -->|"extends"| node_fulltime
node_manager -->|"salary calculation"| node_employee
node_company -->|"calculates report tax"| node_taxcalculator

click node_main "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Main.java"
click node_company "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Company.java"
click node_employee "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Employee.java"
click node_fulltime "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/FullTimeEmployee.java"
click node_parttime "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/PartTimeEmployee.java"
click node_manager "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Manager.java"
click node_taxable "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Taxable.java"
click node_taxcalculator "https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/TaxCalculator.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_user toneBlue
class node_company,node_employee toneAmber
class node_fulltime,node_parttime,node_manager,node_taxable,node_taxcalculator toneMint
```

## Components

### Console interface

- [Menu and input](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Main.java): `src/Main.java`

### Employee management

- [Roster and payroll](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Company.java): `src/Company.java`
- [Employee base](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Employee.java): `src/Employee.java`

### Salary and tax

- [Full-time employee](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/FullTimeEmployee.java): `src/FullTimeEmployee.java`
- [Part-time employee](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/PartTimeEmployee.java): `src/PartTimeEmployee.java`
- [Manager employee](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Manager.java): `src/Manager.java`
- [Taxable interface](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/Taxable.java): `src/Taxable.java`
- [Progressive tax](https://github.com/hungvv109/techviet-hr-payroll/blob/main/src/TaxCalculator.java): `src/TaxCalculator.java`

### Other components

- **Console user**

## Connections

- Console user → Menu and input: selects operation
- Menu and input → Console user: prompts and displays
- Menu and input → Roster and payroll: manages roster
- Menu and input → Full-time employee: creates employee
- Menu and input → Part-time employee: creates employee
- Menu and input → Manager employee: creates employee
- Roster and payroll → Employee base: stores and processes
- Roster and payroll → Taxable interface: calculates displayed tax
- Taxable interface → Progressive tax: delegates tax
- Employee base → Roster and payroll: extends
- Full-time employee → Employee base: extends
- Part-time employee → Employee base: extends
- Manager employee → Full-time employee: extends
- Manager employee → Employee base: salary calculation
- Roster and payroll → Progressive tax: calculates report tax
