The Parking Management System is a Java-based application designed to manage parking spots efficiently. It supports multiple user types, including Students, Faculty, Visitors, and Managers, and provides features such as booking, canceling, and managing parking spots. The system is built with modular architecture and follows design principles to ensure scalability, maintainability, and adaptability.
- User Management: Supports different user roles (Student, Faculty, Non-Faculty, Visitor, Manager, SuperManager).
- Parking Spot Booking: Allows users to book and cancel parking spots.
- Manager Dashboard: Enables managers to monitor and manage parking lots.
- SuperManager Dashboard: Provides advanced administrative controls for super managers.
- SQLite Database Integration: Uses a local SQLite database for data persistence.
- csv-example: Contains logic for user management and parking system operations.
src/logic: Core business logic for users, bookings, and parking management.src/Connections: Database connection logic using SQLite.
- GUI-Demo: Demonstrates the graphical user interface for the system.
src/main/java/statsVisualiser/gui: Contains the main UI logic for the application.
- Java 8 or higher
- SQLite installed locally
- Maven (for managing dependencies in the
GUI-Demomodule)
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd D2 - Ensure the SQLite database file (
parkingsystem.db) is placed in theresourcesfolder. - Build and run the project:
- For the
csv-examplemodule:javac -d bin src/**/*.java java -cp bin Connections.DatabaseConnection
- For the
GUI-Demomodule:mvn clean install mvn exec:java
- For the
- Visit the SQLite Studio official website.
- Download the appropriate version for your operating system (Windows, macOS, or Linux).
- Install SQLite Studio:
- Windows: Run the downloaded
.exefile and follow the installation wizard. - macOS/Linux: Extract the downloaded
.tar.gzor.zipfile to a desired location.
- Windows: Run the downloaded
- Launch SQLite Studio from your installed applications or extracted folder.
- Open SQLite Studio.
- Click on the Database menu and select Add a Database.
- In the dialog box, click the ... (browse) button.
- Navigate to the
resourcesfolder (like:c:\Path\To\Project\D2\resources).- If the
resourcesfolder does not exist, create it manually.
- If the
- Enter
parkingsystem.dbas the file name and click OK. - The newly created
parkingsystem.dbwill appear in the SQLite Studio database list. Double-click on it to connect.
- Ensure the
schema.sqlfile is placed in theresourcesfolder (like:c:\Path\To\Project\D2\resources). - In SQLite Studio, right-click on the
parkingsystem.dbdatabase in the left panel and select Tools > Open SQL Editor. - In the SQL editor, click on the File menu and select Open.
- Navigate to the
resourcesfolder and openschema.sql. - Once the schema is loaded in the SQL editor, click the Execute All button (blue play icon) to create the tables and structure defined in
schema.sql. If the blue play button doesn't execute all queries in the sql file, try SHIFT+F9 on Windows.
- Right-click on
parkingsystem.dbin the left panel and select Refresh if you don't already see the tables. - Expand the
Tablessection underparkingsystem.dbto verify that the tables fromschema.sqlhave been created.
- Ensure the
DatabaseConnectionclass in your project points to theparkingsystem.dbfile in theresourcesfolder. - Do this by going to line 11 in DatabaseConnection.java and replacing the path by the location of the parkingsystem.db database file. Example: String dbPath = "C:/Users/yourname/Downloads/D2/D2/csv-example/CSV-example/src/Resources/parkingsystem.db";
- Example connection string in the
DatabaseConnectionclass:String url = "jdbc:sqlite:" + DatabaseConnection.class.getClassLoader().getResource("parkingsystem.db").getPath();
- Java: Core programming language.
- SQLite: Local database for data persistence.
- Maven: Dependency management for the
GUI-Demomodule.
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
- YorkU EECS 3311: For providing the initial GUI sample code.
- JFreeChart: For the charting library used in the GUI module.
