Skip to content

sagethecreator-cloud/SmartPark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ…ΏοΈ SmartPark β€” Parking Management System

Java JavaFX IntelliJ IDEA Scene Builder OOP Status

A full-featured, dual-role Smart Parking Management System built in Java with a polished JavaFX GUI.
Multi-vehicle support Β· EV charging Β· Real-time slot grid Β· Complete admin portal Β· File persistence

Features Β· Architecture Β· OOP Concepts Β· Getting Started Β· Team


πŸ“Œ Overview

This is not a basic console application.

SmartPark is a fully functional, dual-role parking management system built from the ground up in Java with a hand-crafted JavaFX + Scene Builder graphical interface. It supports four vehicle types including EVs with charging, real-time slot management, automated billing, and a complete admin portal β€” all through a dark-themed GUI.

The backend is architected using core OOP principles: abstract classes, polymorphism, interfaces, custom exceptions, and Java serialization for persistence. The GUI layer sits cleanly on top via the MVC pattern β€” zero business logic in the controller files.

Built as a collaborative team project for the Object Oriented Programming course at COMSATS University Islamabad, Lahore Campus, Spring 2026.


✨ Features

πŸ‘€ User Portal

Feature Description
πŸš— Park Vehicle Select type (Car / Bike / Truck / EV), enter plate and owner, get assigned slot and Entry ID
πŸšͺ Exit & Bill Enter plate number, receive formatted receipt with duration and total charge
πŸ—ΊοΈ Real-time Slot Grid Color-coded visual map β€” 🟒 Available Β· πŸ”΄ Occupied Β· by slot type
πŸ” Find My Vehicle Search any parked vehicle instantly by plate number
⚑ EV Charging Request charging on arrival, set battery level, choose per-minute or per-percent billing

πŸ” Admin Portal

Feature Description
πŸ”‘ Secure Login Username + password authentication
πŸ“Š Dashboard Live stats β€” total slots, available, occupied, revenue overview
πŸ…ΏοΈ Manage Slots Add or remove slots, change slot types dynamically at runtime
πŸ’° Parking Rates Update rates per vehicle type (Car / Bike / Truck / EV) in real time
⚑ EV Charging Rates Set per-minute and per-percent EV charging prices independently
πŸ”‹ Monitor EV Track all active EV charging sessions across every EV slot
🧾 Billing History Complete searchable transaction log of every completed parking session
πŸ“ˆ Generate Reports Occupancy and revenue summaries with export
🚘 Parked Vehicles Full live table of all currently parked vehicles with entry times

πŸ—οΈ Architecture

SmartPark
β”œβ”€β”€ Presentation Layer   β†’  JavaFX + Scene Builder (FXML + CSS dark theme)
β”œβ”€β”€ Controller Layer     β†’  15 FXML Controllers (MVC pattern)
β”œβ”€β”€ Business Logic Layer β†’  Vehicles, ParkingLot, Billing, Admin
└── Persistence Layer    β†’  Java Serialization via FileManager

Class Hierarchy

Vehicle  (abstract)
β”œβ”€β”€ Car    β†’ getRate() = 2.0f  (Compact slot)
β”œβ”€β”€ Bike   β†’ getRate() = 1.0f  (Motorcycle slot)
β”œβ”€β”€ Truck  β†’ getRate() = 3.0f  (Large slot)
└── EV     β†’ getRate() = 5.0f  (EV slot + implements Chargeable)

ParkingLot   β†’  owns      β†’  ParkingSlot[]
Bill         β†’  uses      β†’  Vehicle
EVBill       β†’  extends   β†’  Bill, implements Chargeable
Admin        β†’  manages   β†’  ParkingLot
AppState     β†’  holds     β†’  ParkingLot + Admin + BillingHistory
FileManager  β†’  persists  β†’  everything via Serialization

πŸ“‚ Package Structure

src/main/java/
β”‚
β”œβ”€β”€ com/smartpark/                  ← Core application
β”‚   β”œβ”€β”€ MainApp.java                  Entry point (JavaFX Application)
β”‚   β”œβ”€β”€ AppState.java                 Global state (singleton-style)
β”‚   β”œβ”€β”€ SceneManager.java             Screen navigation helper
β”‚   β”œβ”€β”€ FileManager.java              Load / save via Java serialization
β”‚   └── controllers/                  One controller per FXML screen (15 total)
β”‚       β”œβ”€β”€ WelcomeController.java
β”‚       β”œβ”€β”€ LoginController.java
β”‚       β”œβ”€β”€ AdminDashboardController.java
β”‚       β”œβ”€β”€ UserDashboardController.java
β”‚       β”œβ”€β”€ ParkVehicleController.java
β”‚       β”œβ”€β”€ ExitVehicleController.java
β”‚       β”œβ”€β”€ FindVehicleController.java
β”‚       β”œβ”€β”€ SlotGridController.java
β”‚       β”œβ”€β”€ ManageSlotsController.java
β”‚       β”œβ”€β”€ ParkingRatesController.java
β”‚       β”œβ”€β”€ BillingHistoryController.java
β”‚       β”œβ”€β”€ GenerateReportController.java
β”‚       β”œβ”€β”€ EVChargingController.java
β”‚       β”œβ”€β”€ EVChargingRatesController.java
β”‚       └── MonitorEVController.java
β”‚
β”œβ”€β”€ vehicles/                       ← Vehicle hierarchy
β”‚   β”œβ”€β”€ Vehicle.java                  Abstract base class
β”‚   β”œβ”€β”€ Car.java
β”‚   β”œβ”€β”€ Bike.java
β”‚   β”œβ”€β”€ Truck.java
β”‚   └── EV.java
β”‚
β”œβ”€β”€ parking/                        ← Parking domain
β”‚   β”œβ”€β”€ ParkingLot.java               Manages all slots + rates
β”‚   └── ParkingSlot.java              Individual slot state
β”‚
β”œβ”€β”€ billing/                        ← Billing domain
β”‚   β”œβ”€β”€ Bill.java                     Parking receipt model
β”‚   └── EVBill.java                   EV-specific charging bill
β”‚
β”œβ”€β”€ users/
β”‚   └── Admin.java                    Admin credentials + operations
β”‚
β”œβ”€β”€ interfaces/
β”‚   └── Chargeable.java               EV charging contract
β”‚
β”œβ”€β”€ exceptions/
β”‚   └── ParkingException.java         Custom runtime exception
β”‚
└── filehandler/
    └── FileHandler.java              Low-level file I/O utilities

src/main/resources/fxml/
β”œβ”€β”€ Main/            welcome Β· login Β· adminDashboard Β· userDashboard
β”œβ”€β”€ Admin Features/  manageSlots Β· parkingRates Β· billingHistory Β· generateReport Β· monitor_ev Β· ev_charging_rates
└── User Features/   parkVehicle Β· exitVehicle Β· findVehicle Β· evCharging Β· slotGridView

πŸ–₯️ GUI Screens

Screen Description
Welcome Landing screen with navigation to Admin or User portal
Login Admin credential entry with error feedback
Admin Dashboard Live stat cards + quick-access to all admin features
User Dashboard User portal home with 5 quick-access cards
Park Vehicle Type selector, plate + owner input, slot assignment receipt
Exit Vehicle Plate lookup, full billing receipt with duration and amount
Slot Grid Full color-coded visual map of all parking slots
Parked Vehicles Live table of all currently occupied slots
Manage Slots Add / remove slots and change slot types
Parking Rates Per-vehicle-type rate editor
EV Charging Rates Per-minute and per-percent rate configuration
Monitor EV Live view of all active EV charging sessions
Billing History Searchable complete transaction log
Generate Report Occupancy and revenue report generation
Find Vehicle Plate number search with full vehicle details

🧠 OOP Concepts Used

Concept Where Applied
Abstract Class Vehicle β€” abstract getRate() and getType() methods
Inheritance Car, Bike, Truck, EV all extend Vehicle
Polymorphism ArrayList<Vehicle> holds mixed types; each calls its own getRate()
Interface Chargeable β€” implemented by EVBill for charging fee logic
Encapsulation All fields private; accessed via getters/setters throughout
Comparable Vehicle implements Comparable<Vehicle> β€” sorts by entry time
Comparator Bill uses Comparator for sorting history by amount or date
Serialization ParkingLot and Bill implement Serializable for file persistence
Custom Exception ParkingException thrown for duplicate or invalid parking entries
Composition ParkingLot is composed of ParkingSlot objects
MVC Pattern Full separation β€” FXML (View), Controllers, Model classes
Collections Extensive use of ArrayList and Collections.sort()
Static Methods FileManager β€” load/save methods are static

πŸš€ Getting Started

Prerequisites

  • Java JDK 17 or higher β€” Download
  • JavaFX SDK 17 β€” Download
  • IntelliJ IDEA β€” Download
  • Scene Builder 17+ (optional, for editing FXML) β€” Download

JavaFX Setup in IntelliJ IDEA

  1. Go to File β†’ Project Structure β†’ Libraries β†’ click + β†’ Java
  2. Navigate to your JavaFX SDK folder β†’ select the lib/ subfolder β†’ OK
  3. Go to Run β†’ Edit Configurations β†’ add VM options:
--module-path "C:\path\to\javafx-sdk-17\lib" --add-modules javafx.controls,javafx.fxml
  1. Set Main class to com.smartpark.MainApp

Clone & Run

git clone https://github.com/YOUR_USERNAME/SmartPark.git

Open SmartPark in IntelliJ β†’ configure JavaFX (above) β†’ press β–Ά Run

Default Admin Credentials

Username : Sir Aksam
Password : siraksamisgreat

πŸ‘₯ Team

Team SmartPark Β· COMSATS University Islamabad, Lahore Campus Β· OOP Β· Spring 2026

Name Role
Saad Backend Developer & Initiator
Taha Frontend Developer & Debugger

πŸ“„ License

This project was built for academic purposes as part of the Object Oriented Programming course at COMSATS University Islamabad, Lahore Campus, Spring 2026.


SmartPark Β· COMSATS Lahore Β· OOP Β· Spring 2026

About

πŸ…ΏοΈ Smart Parking Management System β€” JavaFX GUI app with multi-vehicle support, EV charging, real-time slot management, billing & admin dashboard. Built with Java OOP.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors