I am unlikely to check any messages or comments via. GitHub. Please reach out to via. email at tpohlman@proton.me if there are any bugs, questions, concerns, or clarifications about the setup.
This project is a proof of concept, with a cash register program made using JavaFX connecting to a MySQL database.
- JavaFX: Use of a graphical user interface for ease of use.
- FXML: Uses clearly defined standard markup language for displaying the GUI and ease of changing it.
- Controllers: Defined controller classes encapsulate the actions of the GUI and allow for reusability.
- Custom Error Handling: Custom exception classes for throwing unique and identifiable errors.
- Compartmentalization and Abstraction: Unique classes for handling JDBC driver and database access allow for reusable and clean code.
- Item Management: Add, search, and manage items using UPC codes.
- Member Lookup: Effectively handle membership data in order to apply
- discounts and add to member purchase history.
- Sales Transactions: Process sales, calculate totals, and handle receipts with ease.
- Database Integration: Uses a MySQL database to store data and calculate receipts.
- Java JDK 11 or higher
- JavaFX SDK
- MySQL Server
- JDBC driver
- MySQL Workbench
- IntelliJ IDEA Community Edition
The setup of this project involves using MySQL Workbench and IntelliJ IDEA Community Edition for running it on your machine. Other applicable IDEs can be used at your own discretion. I'm walking through the setup on macOS, so some of the instructions may differ depending on your operating system. I would recommend doing a quick web search if you're confused at any of the steps.
Download and install MySQL Sever. The latest version should be fine but, if you have any capability issues, download version 9.0.1. If you have any other issues or need further clarification, read the official MySQL Server installation guide. Make sure to write down the root password you create during installation!
Next, download and install MySQL Workbench. The latest version should also
be fine, but download version 8.0.38 if there are any capability issues. Once again, if you have any other issues or
need further clarification, read the official MySQL Workbench installation guide.
Now download and install IntelliJ IDE. Follow the
official IntelliJ IDEA installation guide for further
information.
Depending on your operating system, you may or may not have Git already installed. If not, follow the official Git download link.
Open the applicable terminal for your operating system and navigate to the desired location where you want to copy the project. Then, simply copy and paste the following command.
git clone https://github.com/tylerjacobpohlman/JavaFX_Register_ApplicationOpen MySQL Workbench. You should see Local Instance 3306 under MySQL Connections.
Double-click on the instance and type in the root password you made at setup. Then, simply click ok.

You should now be on a screen that looks like the following:

Now click the folder icon in the top right corner to find an SQL script to run. Simply navigate to the cloned project
folder and, under the SQL Scripts subfolder, open the file create_database_hvs.sql. The window should now look as
the following.

Finally, run the script using the left-most lighting bolt icon. The database should now be setup and running.

Open IntelliJ, click open, navigate to the project director, and open the project from there.

Click the folder icon in the left sidebar. Navigate down through the subdirectory src until reaching RegisterApplication.java.
Double-click the .java file to open it.

If prompted, download a JDK version. Version 21 or later should work.

Finally, it's time to connect the driver. I would recommend using the driver provided in this project. First click on
the gear icon in the top right and then click on project structure.

Above all the provided libraries, click the plus icon, click Java, navigate to the lib subdirectory, and
open mysql-connector-java-8.0.30.jar.

Click apply and ok at the bottom of the window. Now back at the initial window, click the green run icon at the top.
Doing so should bring up the following screen:

All the details provided are the default login credentials. Upon pressing enter, this following screen is displayed:

Play around with application! The tables items and members within the hvs database contain the data to test the application. Click through all the options and refresh the database to see what changes!
This project wouldn't have become a reality without the close help of my Java Programming professor John Ostroske and Database Systems professor Kevin Lizanich. Both went above and beyond in teaching their respective courses and reviewing my codebase.
