Skip to content

nathandalpatan/CS230-Assignment-2

Repository files navigation

CS230-Assignment-2

This project implements a simplified Auckland Transport Bus Tracker System using Java Swing and key object-oriented design patterns. It models the relationships between buses, drivers, stops, and hubs, providing an interactive GUI to visualize and manage transport data.

Each bus has a unique number and one assigned driver (drivers can manage up to three buses). Buses maintain a list of stops, each recording a dwell time in minutes, and can compute their total dwell time.

The system uses:

Composite Pattern: Hubs (StopGroupComposite) group individual stops (BusStopLeaf) or other hubs, representing complex interchanges like Newmarket or Manukau.

Observer Pattern: A BusTracker notifies observers of arrivals, updating stop details and estimated times in the ETA table.

The GUI integrates three dynamic views:

Bus Table: Displays buses, drivers, and total dwell times.

Hub Table: Shows hub dwell times to validate composite functionality.

Stops List: Displays stops for the currently selected bus, updating dynamically.

This project demonstrates strong integration of OOP principles, design patterns, and GUI programming, resulting in a cohesive and interactive transport-tracking application.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages