# yaraahmedrashid-dev/carservicecenter architecture

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

- Interactive diagram: https://gitdiagram.com/yaraahmedrashid-dev/carservicecenter
- Repository: https://github.com/yaraahmedrashid-dev/carservicecenter

## Overview

CarServiceCenter is a console car-service simulation. Its Center orchestrates cars through arrival scheduling, diagnosis, service waiting and bays, then completion or cancellation; the UI displays timestep state. The excerpts establish the UI’s read-only reporting and several list implementations, while Center.h documents the simulator stages and ownership. Center.cpp was read but not excerpted, so its internal transition calls are not asserted here; unsampled stage links are limited to documented Center responsibilities.

Main entry points: [`CarServiceCenter/UI.h`](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/UI.h) (Console UI), [`CarServiceCenter/Center.cpp`](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.cpp) (Center Engine), [`CarServiceCenter/ServiceSeqList.h`](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ServiceSeqList.h) (Service Sequence), [`CarServiceCenter/ServiceWaitList.h`](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ServiceWaitList.h) (Service Wait Lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation"]
  node_center["Center Engine<br/>[Center.cpp]"]
  node_arrival["Arrival Stages<br/>[Center.h]"]
  node_diagnosis["Diagnosis Stage<br/>[Center.h]"]
  node_terminal["Final States<br/>[Center.h]"]
end

subgraph group_queues["Scheduling Lists"]
  node_waitlists["Service Wait Lists<br/>[ServiceWaitList.h]"]
  node_idlelist["Idle Cars<br/>[IDLE.h]"]
  node_earlylist["Early Cars<br/>[ERLY.h]"]
  node_latecombo["Late And Combo<br/>[LATE.h]"]
  node_inservice["In-Service List<br/>[InServ_List.h]"]
  node_queue["Linked Queue<br/>[LinkedQueue.h]"]
  node_priorityqueue["Priority Queue<br/>[priQueue.h]"]
  node_stack["Result Stacks<br/>[ArrayStack.h]"]
end

subgraph group_service["Service Domain"]
  node_serviceflow["Service Stages<br/>[Center.h]"]
  node_car["Car State<br/>[Car.h]"]
  node_bay["Service Bays<br/>[Bay.h]"]
  node_serviceitem["Service Item<br/>[Service.h]"]
  node_serviceorder["Service Sequence<br/>[ServiceSeqList.h]"]
end

subgraph group_presentation["Console Output"]
  node_ui["Console UI<br/>[UI.h]"]
end

node_center -->|"manages"| node_arrival
node_center -->|"manages"| node_diagnosis
node_center -->|"manages"| node_serviceflow
node_center -->|"manages"| node_terminal
node_center -->|"shows status"| node_ui
node_car -->|"holds"| node_serviceorder
node_waitlists -->|"inherits"| node_queue
node_waitlists -->|"queues"| node_car
node_serviceorder -->|"inherits"| node_queue
node_serviceorder -->|"stores"| node_serviceitem
node_idlelist -->|"inherits"| node_queue
node_earlylist -->|"inherits"| node_priorityqueue
node_ui -->|"prints"| node_idlelist
node_ui -->|"prints"| node_earlylist
node_ui -->|"prints"| node_latecombo
node_ui -->|"prints"| node_waitlists
node_ui -->|"prints"| node_inservice
node_ui -->|"prints bays"| node_bay
node_ui -->|"prints"| node_priorityqueue
node_ui -->|"prints"| node_stack

click node_center "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.cpp"
click node_arrival "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h"
click node_diagnosis "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h"
click node_serviceflow "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h"
click node_terminal "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h"
click node_car "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Car.h"
click node_bay "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Bay.h"
click node_serviceitem "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Service.h"
click node_serviceorder "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ServiceSeqList.h"
click node_waitlists "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ServiceWaitList.h"
click node_idlelist "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/IDLE.h"
click node_earlylist "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ERLY.h"
click node_latecombo "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/LATE.h"
click node_inservice "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/InServ_List.h"
click node_queue "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/LinkedQueue.h"
click node_priorityqueue "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/priQueue.h"
click node_stack "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ArrayStack.h"
click node_ui "https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/UI.h"

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_center,node_arrival,node_diagnosis,node_terminal toneBlue
class node_waitlists,node_idlelist,node_earlylist,node_latecombo,node_inservice,node_queue,node_priorityqueue,node_stack toneAmber
class node_serviceflow,node_car,node_bay,node_serviceitem,node_serviceorder toneMint
class node_ui toneRose
```

## Components

### Simulation

- [Center Engine](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.cpp): `CarServiceCenter/Center.cpp`
- [Arrival Stages](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h): `CarServiceCenter/Center.h`
- [Diagnosis Stage](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h): `CarServiceCenter/Center.h`
- [Final States](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h): `CarServiceCenter/Center.h`

### Scheduling Lists

- [Service Wait Lists](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ServiceWaitList.h): `CarServiceCenter/ServiceWaitList.h`
- [Idle Cars](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/IDLE.h): `CarServiceCenter/IDLE.h`
- [Early Cars](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ERLY.h): `CarServiceCenter/ERLY.h`
- [Late And Combo](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/LATE.h): `CarServiceCenter/LATE.h`
- [In-Service List](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/InServ_List.h): `CarServiceCenter/InServ_List.h`
- [Linked Queue](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/LinkedQueue.h): `CarServiceCenter/LinkedQueue.h`
- [Priority Queue](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/priQueue.h): `CarServiceCenter/priQueue.h`
- [Result Stacks](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ArrayStack.h): `CarServiceCenter/ArrayStack.h`

### Service Domain

- [Service Stages](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Center.h): `CarServiceCenter/Center.h`
- [Car State](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Car.h): `CarServiceCenter/Car.h`
- [Service Bays](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Bay.h): `CarServiceCenter/Bay.h`
- [Service Item](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/Service.h): `CarServiceCenter/Service.h`
- [Service Sequence](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/ServiceSeqList.h): `CarServiceCenter/ServiceSeqList.h`

### Console Output

- [Console UI](https://github.com/yaraahmedrashid-dev/carservicecenter/blob/master/CarServiceCenter/UI.h): `CarServiceCenter/UI.h`

## Connections

- Center Engine → Arrival Stages: manages (evidence: `CarServiceCenter/Center.h`)
- Center Engine → Diagnosis Stage: manages (evidence: `CarServiceCenter/Center.h`)
- Center Engine → Service Stages: manages (evidence: `CarServiceCenter/Center.h`)
- Center Engine → Final States: manages (evidence: `CarServiceCenter/Center.h`)
- Center Engine → Console UI: shows status
- Car State → Service Sequence: holds (evidence: `CarServiceCenter/Car.h`)
- Service Wait Lists → Linked Queue: inherits (evidence: `CarServiceCenter/ServiceWaitList.h`)
- Service Wait Lists → Car State: queues (evidence: `CarServiceCenter/ServiceWaitList.h`)
- Service Sequence → Linked Queue: inherits (evidence: `CarServiceCenter/ServiceSeqList.h`)
- Service Sequence → Service Item: stores (evidence: `CarServiceCenter/ServiceSeqList.h`)
- Idle Cars → Linked Queue: inherits (evidence: `CarServiceCenter/IDLE.h`)
- Early Cars → Priority Queue: inherits (evidence: `CarServiceCenter/ERLY.h`)
- Console UI → Idle Cars: prints (evidence: `CarServiceCenter/UI.h`)
- Console UI → Early Cars: prints (evidence: `CarServiceCenter/UI.h`)
- Console UI → Late And Combo: prints (evidence: `CarServiceCenter/UI.h`)
- Console UI → Service Wait Lists: prints (evidence: `CarServiceCenter/UI.h`)
- Console UI → In-Service List: prints (evidence: `CarServiceCenter/UI.h`)
- Console UI → Service Bays: prints bays (evidence: `CarServiceCenter/UI.h`)
- Console UI → Priority Queue: prints (evidence: `CarServiceCenter/UI.h`)
- Console UI → Result Stacks: prints (evidence: `CarServiceCenter/UI.h`)
