GithubHelp home page GithubHelp logo

lefteris-souflas / java-desktop-app Goto Github PK

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

Java desktop app for parking lot management calculates charges based on time, records entries/exits in a database, and displays status/collections. User options include entering/exiting parking, saving transactions, starting a new day, searching cars, and exiting. JTextArea and JTable components are utilized for interaction and data display.

License: MIT License

Java 100.00%
desktop-app java jfilechooser jtable jtextarea

java-desktop-app's Introduction

Java Exercise on GUI and Databases

Desktop App Project for the Java Course of the Department of Programmers-Analysts of the School of Computer Programmers of the Hellenic Armed Forces

Description

A parking lot charges $2.00 minimum cost for parking up to 3 hours. For each hour or part of an hour over 3, it charges an additional $0.50. The maximum charge for a full 24-hour period is $10.00.

Write an application that calculates and displays the parking charge for each customer who parks in the parking lot. You should record the hours each customer parked each time and then display their charge and the current collections for that day. You will need to create a calculateCharges method which will calculate and return the charge amount for each customer.

Build the application using a database and extend the functionality according to the following minimum requirements:

  • Record in the database the entry and exit of each car with the registration number, time, and date given by the user.
  • For the case where a car is left inside the car park at the close of the day, it shall be considered to leave at that time at the maximum parking cost.
  • Assume that the parking can have up to 50 cars at the same time.

Main Screen Features

  • Display information about the current status of the parking: the number of cars in the parking and the free spaces, the current total collection for the day.
  • Include a JTextArea where all the history is kept, i.e., car entries and exits with hours of stay and corresponding costs in the order they came and left (see the append method of JTextArea for adding text).

User Options

  • Use menus and buttons for user interaction.

  • Entering the parking lot:

    • Insert license plate.
    • Enter arrival time (date is automatically entered from the system date).
    • Store record in the database.
    • Update parking status.
  • Exiting from the parking lot:

    • Enter license plate.
    • Check that a plate is present in the base.
    • Enter exit time.
    • Calculate the payment amount according to the hours of stay.
    • Remove the car from the car park.
    • Update parking status.
  • Save all transactions of the day from JTextArea using JFileChooser and showSaveDialog.

  • Start a new day where they empty/zero out any variables needed and any components needed (e.g., Textarea).

  • Show a second window with the possibility to search for cars by license plate or by date: use JTable where license plate, date, entry time, exit time, and cost of stay for each car is displayed.

  • Exit from the program.

Only the files with a java extension you created will be sent.

java-desktop-app's People

Contributors

lefteris-souflas 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.