Giter Site home page Giter Site logo

codenamecypher / parking-spot-manager Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 86 KB

A basic parking spot management system developed using Java Swing and AWT libraries, featuring functionalities to add and remove parking spots, park and remove cars, and find cars by registration, make, model, or spot identifier. Additional functionalities include resetting searches and the entire parking spot system.

Java 100.00%
awt awt-gui gui-application java javaawt javaswing swing swing-application swing-gui swing-gui-application

parking-spot-manager's Introduction

Parking Spot Manager

Brief Description

A basic parking spot management system developed using Java Swing and AWT libraries, featuring functionalities to add and remove parking spots, park and remove cars, and find cars by registration, make, model, or spot identifier. Additional functionalities include resetting searches and the entire parking spot system.

Button Functionalities

  • Add Spot: Prompts for an identifier and adds a spot to the parking spots.
  • Remove Spot: Prompts for an identifier and removes the spot from the parking spots if it exists.
  • Park Car: Prompts to select a spot identifier, car registration, make, model, and year, then parks the car in the specified spot.
  • Remove Car: Prompts for a car registration number and removes the car if found.
  • Find Car: Prompts for search categories (registration, make, model) and highlights the spot if the car is found.
  • Find Identifier: Prompts for an identifier number and highlights the spot if the car is found.
  • Reset: Removes all cars from all the parking spots.
  • Reset Search: Removes all the search highlight colors from all the spots.
  • Exit: Exits the application.

Running the Application

To run the application:

  1. Open BlueJ.
  2. Right-click on the GUI class.
  3. Select and run the main function.

GUI Components Used

Libraries

  • Java Swing
  • Java AWT

Classes

  • JFrame: Used to create the frame. Initialized in the GUI class’s constructor.
  • JPanel: Used to create header, button, and spot panels. Initialized in the GUI class’s addPanels() function.
  • JButton: Used to create addSpot, removeSpot, parkCar, removeCar, findCar, findIdentifier, resetSearch, reset, and exit buttons. Initialized in the GUI class’s addButtons() function.
  • Color: Used to create the colors of the application. Initialized as class variables.
  • BorderLayout: Used in setting frame layout in the GUI class’s constructor.
  • GridLayout: Used in setting layout for button and spot panels in the GUI class’s addPanels() function.
  • Font: Used to format different fonts (e.g., Monospaced & Courier with different sizes and weights) for the application.
  • JOptionPane: Used to show dialog boxes for taking inputs or showing responses to the user.
  • JLabel: Used to create the header label, which stays in the header panel. Initialized in the GUI class’s addPanels() function.
  • JTextField: Used to take inputs for registration, make, model, and year in the park car button’s action listener.
  • JComboBox: Used to take inputs for the identifier in the park car button’s action listener.
  • ActionListener: Used to add interaction to all the buttons in the application.

Author

  • Aditya Roy

Screenshot

ScreenShot

parking-spot-manager's People

Contributors

codenamecypher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.