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
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.
| 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 |
| Feature | Description |
|---|---|
| π Secure Login | Username + password authentication |
| π Dashboard | Live stats β total slots, available, occupied, revenue overview |
| 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 |
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
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
| 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 |
| 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 |
- Java JDK 17 or higher β Download
- JavaFX SDK 17 β Download
- IntelliJ IDEA β Download
- Scene Builder 17+ (optional, for editing FXML) β Download
- Go to File β Project Structure β Libraries β click + β Java
- Navigate to your JavaFX SDK folder β select the
lib/subfolder β OK - Go to Run β Edit Configurations β add VM options:
--module-path "C:\path\to\javafx-sdk-17\lib" --add-modules javafx.controls,javafx.fxml
- Set Main class to
com.smartpark.MainApp
git clone https://github.com/YOUR_USERNAME/SmartPark.gitOpen SmartPark in IntelliJ β configure JavaFX (above) β press βΆ Run
Username : Sir Aksam
Password : siraksamisgreat
Team SmartPark Β· COMSATS University Islamabad, Lahore Campus Β· OOP Β· Spring 2026
| Name | Role |
|---|---|
| Saad | Backend Developer & Initiator |
| Taha | Frontend Developer & Debugger |
This project was built for academic purposes as part of the Object Oriented Programming course at COMSATS University Islamabad, Lahore Campus, Spring 2026.