# tehreemshahid2025-debug/csc241-oop-sem-2- architecture

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

- Interactive diagram: https://gitdiagram.com/tehreemshahid2025-debug/csc241-oop-sem-2-
- Repository: https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-

## Overview

This repository is a collection of standalone Java coursework examples, not one integrated application. The clearest end-to-end workflow is the pharmacy exercise: a Ward creates and shuffles pharmacy stock, issues medicines to patients, and displays their prescriptions. Other groups capture separate examples in student records, person models, product inventory, library books, and an animal shop. Relationships are limited to those shown in excerpts or the source index; some application entry-point behavior is not shown.

Main entry points: [`Pharmacy/src/model/Pharmacy.java`](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Pharmacy.java) (Stock management), [`Pharmacy/src/model/Ward.java`](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Ward.java) (Ward workflow), [`Practice/Task 02/src/app/Main.java`](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/app/Main.java) (Shop demo), [`Pharmacy/src/model/Patient.java`](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Patient.java) (Patient prescriptions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pharmacy["Pharmacy Exercise"]
  node_ward["Ward workflow<br/>[Ward.java]"]
  node_pharmacy_stock["Stock management<br/>[Pharmacy.java]"]
  node_patient["Patient prescriptions<br/>[Patient.java]"]
  node_medicine["Medicine model<br/>[Medicine.java]"]
  node_category["Medicine categories<br/>[Category.java]"]
  node_dosage["Medicine dosages<br/>[Dosage.java]"]
  node_pharmacy_interface["Pharmacy interface<br/>[Interface.java]"]
end

subgraph group_student["Student Exercises"]
  node_student_demo["Student demo<br/>[Demo.java]"]
  node_student_model["Student model<br/>[Student.java]"]
  node_overload_example["Overload example<br/>[Overload.java]"]
  node_overload_demo["Overload demo<br/>[OverloadDemo.java]"]
end

subgraph group_people["Person Exercises"]
  node_person_string["Person with text date<br/>[Person.java]"]
  node_person_date["Person with date object<br/>[Person1.java]"]
end

subgraph group_products["Product Examples"]
  node_product["Product inventory<br/>[Product.java]"]
  node_library_book["Library book<br/>[Book.java]"]
  node_library_demo["Library demo<br/>[Main.java]"]
end

subgraph group_shop["Animal Shop"]
  node_animal_demo["Shop demo<br/>[Main.java]"]
  node_animal["Animal model<br/>[Animal.java]"]
  node_dog["Dog model<br/>[Dog.java]"]
  node_bird["Bird model<br/>[Bird.java]"]
end

node_ward -->|"creates and shuffles"| node_pharmacy_stock
node_ward -->|"requests medicines"| node_pharmacy_stock
node_ward -->|"issues medicines"| node_patient
node_ward -->|"reads prescriptions"| node_patient
node_pharmacy_stock -->|"creates and dispenses"| node_medicine
node_pharmacy_stock -->|"iterates values"| node_category
node_pharmacy_stock -->|"iterates values"| node_dosage
node_patient -->|"stores prescriptions"| node_medicine
node_student_demo -->|"creates and updates"| node_student_model
node_overload_demo -->|"demonstrates"| node_overload_example
node_product -->|"uses date"| node_product
node_library_demo -->|"creates and displays"| node_library_book
node_animal_demo -->|"creates and calls"| node_dog
node_animal_demo -->|"creates and calls"| node_bird
node_animal_demo -->|"reads shop totals"| node_animal
node_dog -->|"extends"| node_animal
node_bird -->|"extends"| node_animal

click node_ward "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Ward.java"
click node_pharmacy_stock "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Pharmacy.java"
click node_patient "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Patient.java"
click node_medicine "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Medicine.java"
click node_category "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Category.java"
click node_dosage "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Dosage.java"
click node_pharmacy_interface "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/app/Interface.java"
click node_student_demo "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/Demo.java"
click node_student_model "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/Student.java"
click node_overload_example "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/Overload.java"
click node_overload_demo "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/OverloadDemo.java"
click node_person_string "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab04/Task%2001/Person.java"
click node_person_date "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab04/Task%2002/Person1.java"
click node_product "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab05/Product.java"
click node_library_book "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2001/Book.java"
click node_library_demo "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2001/Main.java"
click node_animal_demo "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/app/Main.java"
click node_animal "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/shop/Animal.java"
click node_dog "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/shop/Dog.java"
click node_bird "https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/shop/Bird.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_ward,node_pharmacy_stock,node_patient,node_medicine,node_category,node_dosage,node_pharmacy_interface toneBlue
class node_student_demo,node_student_model,node_overload_example,node_overload_demo toneAmber
class node_person_string,node_person_date toneMint
class node_product,node_library_book,node_library_demo toneRose
class node_animal_demo,node_animal,node_dog,node_bird toneIndigo
```

## Components

### Pharmacy Exercise

- [Ward workflow](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Ward.java): `Pharmacy/src/model/Ward.java`
- [Stock management](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Pharmacy.java): `Pharmacy/src/model/Pharmacy.java`
- [Patient prescriptions](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Patient.java): `Pharmacy/src/model/Patient.java`
- [Medicine model](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Medicine.java): `Pharmacy/src/model/Medicine.java`
- [Medicine categories](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Category.java): `Pharmacy/src/model/Category.java`
- [Medicine dosages](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/model/Dosage.java): `Pharmacy/src/model/Dosage.java`
- [Pharmacy interface](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Pharmacy/src/app/Interface.java): `Pharmacy/src/app/Interface.java`

### Student Exercises

- [Student demo](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/Demo.java): `Lab02/Demo.java`
- [Student model](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/Student.java): `Lab02/Student.java`
- [Overload example](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/Overload.java): `Lab02/Overload.java`
- [Overload demo](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab02/OverloadDemo.java): `Lab02/OverloadDemo.java`

### Person Exercises

- [Person with text date](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab04/Task%2001/Person.java): `Lab04/Task 01/Person.java`
- [Person with date object](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab04/Task%2002/Person1.java): `Lab04/Task 02/Person1.java`

### Product Examples

- [Product inventory](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Lab05/Product.java): `Lab05/Product.java`
- [Library book](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2001/Book.java): `Practice/Task 01/Book.java`
- [Library demo](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2001/Main.java): `Practice/Task 01/Main.java`

### Animal Shop

- [Shop demo](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/app/Main.java): `Practice/Task 02/src/app/Main.java`
- [Animal model](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/shop/Animal.java): `Practice/Task 02/src/shop/Animal.java`
- [Dog model](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/shop/Dog.java): `Practice/Task 02/src/shop/Dog.java`
- [Bird model](https://github.com/tehreemshahid2025-debug/csc241-oop-sem-2-/blob/main/Practice/Task%2002/src/shop/Bird.java): `Practice/Task 02/src/shop/Bird.java`

## Connections

- Ward workflow → Stock management: creates and shuffles (evidence: `Pharmacy/src/model/Ward.java`)
- Ward workflow → Stock management: requests medicines (evidence: `Pharmacy/src/model/Ward.java`)
- Ward workflow → Patient prescriptions: issues medicines (evidence: `Pharmacy/src/model/Ward.java`)
- Ward workflow → Patient prescriptions: reads prescriptions (evidence: `Pharmacy/src/model/Ward.java`)
- Stock management → Medicine model: creates and dispenses (evidence: `Pharmacy/src/model/Pharmacy.java`)
- Stock management → Medicine categories: iterates values (evidence: `Pharmacy/src/model/Pharmacy.java`)
- Stock management → Medicine dosages: iterates values (evidence: `Pharmacy/src/model/Pharmacy.java`)
- Patient prescriptions → Medicine model: stores prescriptions (evidence: `Pharmacy/src/model/Patient.java`)
- Student demo → Student model: creates and updates (evidence: `Lab02/Demo.java`)
- Overload demo → Overload example: demonstrates (evidence: `Lab02/OverloadDemo.java`)
- Product inventory → Product inventory: uses date (evidence: `Lab05/Product.java`)
- Library demo → Library book: creates and displays (evidence: `Practice/Task 01/Main.java`)
- Shop demo → Dog model: creates and calls (evidence: `Practice/Task 02/src/app/Main.java`)
- Shop demo → Bird model: creates and calls (evidence: `Practice/Task 02/src/app/Main.java`)
- Shop demo → Animal model: reads shop totals (evidence: `Practice/Task 02/src/app/Main.java`)
- Dog model → Animal model: extends (evidence: `Practice/Task 02/src/shop/Dog.java`)
- Bird model → Animal model: extends (evidence: `Practice/Task 02/src/shop/Bird.java`)
