# mustyalavivek/javaprograms architecture

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

- Interactive diagram: https://gitdiagram.com/mustyalavivek/javaprograms
- Repository: https://github.com/mustyalavivek/javaprograms

## Overview

This repository is a collection of standalone Java exercises, not a single application. Its examples demonstrate file processing, object-oriented modeling, threads, company records, and exception handling. The visible entry points are individual `main` methods; there is no documented shared runtime workflow. The graph groups related exercises and shows only relationships supported by excerpts or the SOURCE INDEX. Several listed exercises were not sampled, so their internal behavior and connections are left unspecified.

Main entry points: [`src/com/company/CompanyTest.java`](https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/CompanyTest.java) (Company demo), [`src/LabExam/Problem4.java`](https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/Problem4.java) (Lab account demo), [`src/Files`](https://github.com/mustyalavivek/javaprograms/tree/master/src/Files) (File exercises), [`src/exceptionHandling/NegativeBalanceException.java`](https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/NegativeBalanceException.java) (Negative balance exception)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_files["File exercises"]
  node_file_examples["File exercises"]
  node_file_encode["Encode and decode<br/>[Problem5.java]"]
  node_file_word_count["Unique words<br/>[Problem6.java]"]
  node_file_aggregation["Library aggregation"]
end

subgraph group_inheritance["Object modeling"]
  node_inheritance_examples["Modeling exercises"]
  node_appliance_types["Appliance types<br/>[Appliance.java]"]
  node_composition_example["Composition example<br/>[Composition.java]"]
end

subgraph group_threads["Thread exercises"]
  node_thread_examples["Thread exercises"]
  node_thread_worker["Thread worker"]
end

subgraph group_company["Company records"]
  node_company_demo["Company demo<br/>[CompanyTest.java]"]
  node_company_account["Account details<br/>[Account.java]"]
  node_company_employee["Employee details<br/>[Employee.java]"]
end

subgraph group_exceptions["Exception exercises"]
  node_exception_examples["Exception exercises"]
  node_negative_balance_exception["Negative balance exception"]
  node_interest_example["Interest calculation<br/>[Problem6.java]"]
  node_balance_demo["Account exception demo<br/>[Example6.java]"]
  node_lab_account_demo["Lab account demo<br/>[Problem4.java]"]
  node_lab_insufficient["Insufficient balance"]
  node_lab_negative["Negative balance"]
end

node_file_encode -->|"writes files"| node_file_examples
node_file_word_count -->|"reads file"| node_file_examples
node_company_demo -->|"displays account"| node_company_account
node_company_demo -->|"displays employee"| node_company_employee
node_interest_example -->|"throws exception"| node_negative_balance_exception
node_balance_demo -->|"throws exception"| node_negative_balance_exception
node_lab_account_demo -->|"throws exception"| node_lab_insufficient
node_lab_account_demo -->|"throws exception"| node_lab_negative
node_thread_examples -->|"uses worker"| node_thread_worker
node_inheritance_examples -->|"uses appliance"| node_appliance_types

click node_file_examples "https://github.com/mustyalavivek/javaprograms/tree/master/src/Files"
click node_file_encode "https://github.com/mustyalavivek/javaprograms/blob/master/src/Files/Problem5.java"
click node_file_word_count "https://github.com/mustyalavivek/javaprograms/blob/master/src/Files/Problem6.java"
click node_file_aggregation "https://github.com/mustyalavivek/javaprograms/blob/master/src/Files/PracticeAggregation.java"
click node_inheritance_examples "https://github.com/mustyalavivek/javaprograms/tree/master/src/Inheritance"
click node_appliance_types "https://github.com/mustyalavivek/javaprograms/blob/master/src/Inheritance/Appliance.java"
click node_composition_example "https://github.com/mustyalavivek/javaprograms/blob/master/src/Inheritance/Composition.java"
click node_thread_examples "https://github.com/mustyalavivek/javaprograms/tree/master/src/Threads"
click node_thread_worker "https://github.com/mustyalavivek/javaprograms/blob/master/src/Threads/Problem1thread.java"
click node_company_demo "https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/CompanyTest.java"
click node_company_account "https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/account/Account.java"
click node_company_employee "https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/hr/Employee.java"
click node_exception_examples "https://github.com/mustyalavivek/javaprograms/tree/master/src/exceptionHandling"
click node_negative_balance_exception "https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/NegativeBalanceException.java"
click node_interest_example "https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/Problem6.java"
click node_balance_demo "https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/Example6.java"
click node_lab_account_demo "https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/Problem4.java"
click node_lab_insufficient "https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/InsufficientBalance.java"
click node_lab_negative "https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/NegativeBalance.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_file_examples,node_file_encode,node_file_word_count,node_file_aggregation toneBlue
class node_inheritance_examples,node_appliance_types,node_composition_example toneAmber
class node_thread_examples,node_thread_worker toneMint
class node_company_demo,node_company_account,node_company_employee toneRose
class node_exception_examples,node_negative_balance_exception,node_interest_example,node_balance_demo,node_lab_account_demo,node_lab_insufficient,node_lab_negative toneIndigo
```

## Components

### File exercises

- [File exercises](https://github.com/mustyalavivek/javaprograms/tree/master/src/Files): `src/Files`
- [Encode and decode](https://github.com/mustyalavivek/javaprograms/blob/master/src/Files/Problem5.java): `src/Files/Problem5.java`
- [Unique words](https://github.com/mustyalavivek/javaprograms/blob/master/src/Files/Problem6.java): `src/Files/Problem6.java`
- [Library aggregation](https://github.com/mustyalavivek/javaprograms/blob/master/src/Files/PracticeAggregation.java): `src/Files/PracticeAggregation.java`

### Object modeling

- [Modeling exercises](https://github.com/mustyalavivek/javaprograms/tree/master/src/Inheritance): `src/Inheritance`
- [Appliance types](https://github.com/mustyalavivek/javaprograms/blob/master/src/Inheritance/Appliance.java): `src/Inheritance/Appliance.java`
- [Composition example](https://github.com/mustyalavivek/javaprograms/blob/master/src/Inheritance/Composition.java): `src/Inheritance/Composition.java`

### Thread exercises

- [Thread exercises](https://github.com/mustyalavivek/javaprograms/tree/master/src/Threads): `src/Threads`
- [Thread worker](https://github.com/mustyalavivek/javaprograms/blob/master/src/Threads/Problem1thread.java): `src/Threads/Problem1thread.java`

### Company records

- [Company demo](https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/CompanyTest.java): `src/com/company/CompanyTest.java`
- [Account details](https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/account/Account.java): `src/com/company/account/Account.java`
- [Employee details](https://github.com/mustyalavivek/javaprograms/blob/master/src/com/company/hr/Employee.java): `src/com/company/hr/Employee.java`

### Exception exercises

- [Exception exercises](https://github.com/mustyalavivek/javaprograms/tree/master/src/exceptionHandling): `src/exceptionHandling`
- [Negative balance exception](https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/NegativeBalanceException.java): `src/exceptionHandling/NegativeBalanceException.java`
- [Interest calculation](https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/Problem6.java): `src/exceptionHandling/Problem6.java`
- [Account exception demo](https://github.com/mustyalavivek/javaprograms/blob/master/src/exceptionHandling/Example6.java): `src/exceptionHandling/Example6.java`
- [Lab account demo](https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/Problem4.java): `src/LabExam/Problem4.java`
- [Insufficient balance](https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/InsufficientBalance.java): `src/LabExam/InsufficientBalance.java`
- [Negative balance](https://github.com/mustyalavivek/javaprograms/blob/master/src/LabExam/NegativeBalance.java): `src/LabExam/NegativeBalance.java`

## Connections

- Encode and decode → File exercises: writes files (evidence: `src/Files/Problem5.java`)
- Unique words → File exercises: reads file (evidence: `src/Files/Problem6.java`)
- Company demo → Account details: displays account (evidence: `src/com/company/CompanyTest.java`)
- Company demo → Employee details: displays employee (evidence: `src/com/company/CompanyTest.java`)
- Interest calculation → Negative balance exception: throws exception (evidence: `src/exceptionHandling/Problem6.java`)
- Account exception demo → Negative balance exception: throws exception (evidence: `src/exceptionHandling/Example6.java`)
- Lab account demo → Insufficient balance: throws exception (evidence: `src/LabExam/Problem4.java`)
- Lab account demo → Negative balance: throws exception (evidence: `src/LabExam/Problem4.java`)
- Thread exercises → Thread worker: uses worker (evidence: `src/Threads/Problem1.java`)
- Modeling exercises → Appliance types: uses appliance (evidence: `src/Inheritance/Problem3.java`)
