To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.

Due Date:      11:59 pm, Sunday 28 August 2022

Objectives:     To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.

Introduction

The aim of the assignment is to create an application to maintain a collection of products stored in your warehouse. The products and a list of items are stored in a MySQL database.

The system consists of the following main classes:

  • •            Product
  • Item
  • •            WarehouseDSC
  • WarehouseFX

The Product class represents a Product item stored in the warehouse. The complete class code is provided. As can be seen from the provided code, the class has the following attributes:

  • id: the unique identifier of a product.
  • item: an instance of Item class.
    • Item class, (complete code also provided) has the following attributes
      • name: the name of an item from which you can pick to make a Product object
      • expires: whether or not this item can expire
  • date: the date the Product item was added to the warehouse.
  • quantity: quantity of such Product item added to the warehouse at the same time.
  • section: which section of the warehouse is this Product stored.

The id attribute of a Product is of type int and is actually automatically generated by the database, as can be seen in the SQL script.

The second class, Item, has a one to one mapping with the Product where Product class has one (and only one) instance of Item.

The third class, WarehouseDSC, is the data source controller. A skeleton of this class is provided.

The fourth class, WarehouseFX, provide the graphical user interface for the users to interact with the system. This class is implemented in JavaFX. A skeleton of this class is provided.

An SQL script is also provided to create the tables. Note:

  • 2 tables will be created upon execution of the script: a Product table and an item table.
  • Sample records will also be added to these 2 tables

Task 1

Implement the WarehouseDSC class. A skeleton of the class is provided, which indicates the methods that you are required to implement. Relevant database connectivity measure must be coded in (DriverManager, Connection, Statement, PreparedStatement) and the implementation for methods stubs require you to connect to a database/table and perform the required task – the queries (String variable) for each of the method will be provided in the code.

NOTE: Carefully read the comments provided throughout the skeleton class – they provide useful hints on how to proceed with each method stubs/tasks. You are required to implement each part labeled with /* TODO 1-xx – TO COMPLETE ****************************************

Task 2

Implement the WarehouseFX class. When the system is started, a screen similar to the one shown in Figure 1 is displayed. Your WarehouseFX class should create an instance of WarehouseDSC class and use that object instance methods to perform the create, read, update, delete (CRUD) operations described below;

NOTE: Carefully read the comments provided throughout the skeleton class – they provide useful hints on how to proceed with each method stubs/tasks. You are required to implement each part labeled with

/* TODO 2-xx – TO COMPLETE ****************************************

Figure 1 – Screen displayed by WarehouseFX

Describing the User Interface Flow/Requirements

Figure 1 shows the overall User Interface of the application you are required to build; Let us discuss each section;

Figure 1.1 – “Filter By:” ChoiceBox in action Figure 1.1 shows the following interactive controls:

  • A TextField – this allows the user to filter the TableView data
  • A ChoiceBox – this allows the user to select which Column of the TableView to use as filter target o When ITEM option (default selection) is selected, the TextField filter will target the values in the TableView “Item” column
    •             When SECTION option is selected, the TextField filter will target the values in the TableView “Section” column o When BOUGHT_DAYS_AGO is

selected, it does the following:

  • Enables the “Show Expire Only” CheckBoxSets the TextField filter to the TableView “Bought” column (only it’s numerical value), listing all Product s bought on the filtered value days and prior
  • A CheckBox –   this   is   currently   disabled;   this   control   is   enabled   when   the   “Filter   By:”

BOUGHT_DAYS_AGO option is selected.

NOTE: the Product class has an attribute of type Item class; Item class has a boolean expires attribute; The “Show Expire Only” Checkbox, when selected, will also filter out those Product elements having an item with attribute expires set to true;

Figure 1.2 – BOUGHT_DAYS AGO filter, “Show Expire             Figure 1.3 – BOUGHT_DAYS AGO filter, “Show Expire Only” not selected                                                                          Only” selected

The next control is the TableView. The TableView displays the Product s in the collection, one Product per row. Each row of the TableView is selectable; In order to use the “UPDATE ONE” or the “DELETE” button, the relevant TableView row (a product ) must be selected by the user;

Adding a new product :

Clicking the “ADD” button reveals a hidden container (see Figure 2)

Figure 2 – Adding a Product

You are then provided with 3 controls:

  • A ComboBox – lists all items stored – each item is an instance of Item class; For simplicity, we are displaying the toString() result of each item instance as value of the ComboBox list. (see Figure

2.1)

  • A ChoiceBox – listing the possible sections in the warehouse; the section values is defined as an enum

in WarehouseDSC class. (See Figure 2.2)

  • A TextField – user input for quantity of selected item the user is about to add to the warehouse.

Figure 2.1 – the “Item” ComboBox listing                                    Figure 2.2 – the “Section” ChoiceBox listin

After selecting/entering some Product information in the add controls, click the SAVE button, to create a new Product entry (see Figure 2.3 and 2.4)

Figure 2.3 – entering new Product information                 Figure 2.4 – saved new product , listed in the TableView

Update One Product

The UPDATE ONE button decreases the quantity of a selected Product in the TableView. If the selected Product is already one it will prompt a relevant error message.

Figure 2.5 – try to UPDATE ONE Product with quantity = 1        Figure 2.6 – successfully UPDATE ONE action on Product

(id: 33) with quantity = 3, now quantity = 2

Delete (one) Product

The DELETE button prompts user with a confirmation message, and if user accepts (clicks OK button) deletes the selected product .

Figure 2.5 – DELETE selected product , user prompted for               Figure 2.6 – successful DELETE of Product (id: 19) confirmation

Use adequate means of alerting users of relevant events

Make sure you add a notification mechanism (example: Alert boxes) to

  • Prompt user before executing a critical action (an add, an update or a delete)
  • Inform user when an error has occurred; see Exception Handling for more requirements on error handling

Exception Handling

Make sure you add the exception handling code so that whenever an exception occurs, the program displays an alert which shows a brief message about the exception.

Implementation Suggestion

You are encouraged to implement Assignment 1 in the following order:

  1. In the JavaFX UI class (WarehouseFX), code the control and container elements;
  2. Code the data source controller (WarehouseDSC), all the required interaction with the database, the methods needed for the UI class (WarehouseFX) to interact with this data source controller
    1. Implement a main method in your WarehouseDSC class to facilitate testing all the needed required methods; see your lab sample solution for some examples.
  3. Go back to the UI class (WarehouseFX)
  4. add Lambda function code stubs for the Buttons setOnAction methods;
  5. add the relevant Alert boxes
  6. Test the overall system thoroughly, making sure it compiles on sql

There are two approaches:

  1. In the JavaFX GUI class (WarehouseFX), this is a commented-out section that includes the code for creating a list of products. If you use this commented out section for the TableView you can get the control

and container elements done. Add Lambda function code stubs for the Buttons setOnAction methods and add the relevant Alert boxes. Then later when you have done the WarehouseDSC.java you can replace the hard coded products list with the list that comes back from the DSC. The advantage of this is that you can start earlier, and don’t have to wait for the SQL lectures.

  • Start with the WarehouseDSC.java, this has all the required interaction with the database, and includes all methods needed for the UI class (WarehouseFX). Examine the main method in your WarehouseDSC class and test all the needed required methods. Then Work on the WarehouseFX.java.

Files Provided

  • Item.java
    • Product.java
    • WarehouseDSC.java
    • WarehouseFX.java
    • CreateDatabaseScript.sql
Order Now

Get expert help for To design and implement an application in JavaFX and to use SQL and JDBC for data persistence and many more. 24X7 help, plag free solution. Order online now!

Universal Assignment (September 3, 2025) To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.. Retrieved from https://universalassignment.com/to-design-and-implement-an-application-in-javafx-and-to-use-sql-and-jdbc-for-data-persistence/.
"To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.." Universal Assignment - September 3, 2025, https://universalassignment.com/to-design-and-implement-an-application-in-javafx-and-to-use-sql-and-jdbc-for-data-persistence/
Universal Assignment August 26, 2022 To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.., viewed September 3, 2025,<https://universalassignment.com/to-design-and-implement-an-application-in-javafx-and-to-use-sql-and-jdbc-for-data-persistence/>
Universal Assignment - To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.. [Internet]. [Accessed September 3, 2025]. Available from: https://universalassignment.com/to-design-and-implement-an-application-in-javafx-and-to-use-sql-and-jdbc-for-data-persistence/
"To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.." Universal Assignment - Accessed September 3, 2025. https://universalassignment.com/to-design-and-implement-an-application-in-javafx-and-to-use-sql-and-jdbc-for-data-persistence/
"To design and implement an application in JavaFX and to use SQL and JDBC for data persistence.." Universal Assignment [Online]. Available: https://universalassignment.com/to-design-and-implement-an-application-in-javafx-and-to-use-sql-and-jdbc-for-data-persistence/. [Accessed: September 3, 2025]

Please note along with our service, we will provide you with the following deliverables:

Please do not hesitate to put forward any queries regarding the service provision.

We look forward to having you on board with us.

Most Frequent Questions & Answers

Universal Assignment Services is the best place to get help in your all kind of assignment help. We have 172+ experts available, who can help you to get HD+ grades. We also provide Free Plag report, Free Revisions,Best Price in the industry guaranteed.

We provide all kinds of assignmednt help, Report writing, Essay Writing, Dissertations, Thesis writing, Research Proposal, Research Report, Home work help, Question Answers help, Case studies, mathematical and Statistical tasks, Website development, Android application, Resume/CV writing, SOP(Statement of Purpose) Writing, Blog/Article, Poster making and so on.

We are available round the clock, 24X7, 365 days. You can appach us to our Whatsapp number +1 (613)778 8542 or email to info@universalassignment.com . We provide Free revision policy, if you need and revisions to be done on the task, we will do the same for you as soon as possible.

We provide services mainly to all major institutes and Universities in Australia, Canada, China, Malaysia, India, South Africa, New Zealand, Singapore, the United Arab Emirates, the United Kingdom, and the United States.

We provide lucrative discounts from 28% to 70% as per the wordcount, Technicality, Deadline and the number of your previous assignments done with us.

After your assignment request our team will check and update you the best suitable service for you alongwith the charges for the task. After confirmation and payment team will start the work and provide the task as per the deadline.

Yes, we will provide Plagirism free task and a free turnitin report along with the task without any extra cost.

No, if the main requirement is same, you don’t have to pay any additional amount. But it there is a additional requirement, then you have to pay the balance amount in order to get the revised solution.

The Fees are as minimum as $10 per page(1 page=250 words) and in case of a big task, we provide huge discounts.

We accept all the major Credit and Debit Cards for the payment. We do accept Paypal also.

Popular Assignments

Assignment Help in Windsor, Melbourne

Introduction Windsor is a vibrant and well-connected inner suburb located just 4 kilometres southeast of Melbourne’s CBD. Known for its trendy cafés, boutique shopping, and heritage streets, Windsor attracts a mix of students, young professionals, and families. Its proximity to major educational institutions, including RMIT University, the University of Melbourne,

Read More »

Assignment Help in Williamstown North, Melbourne

Introduction Williamstown North is a charming suburb located about 10 kilometres southwest of Melbourne’s CBD. Known for its mix of residential streets, industrial areas, and proximity to the waterfront, Williamstown North offers a balanced environment for students seeking both study and leisure opportunities. The suburb is well-connected to Melbourne’s educational

Read More »

Assignment Help in West Footscray, Melbourne

Introduction West Footscray is a vibrant suburb located approximately 7 kilometres west of Melbourne’s CBD. Known for its multicultural community, excellent cafés, and close proximity to universities and TAFE institutes, West Footscray is a popular choice for students seeking a balanced lifestyle. Its convenient transport links, including the West Footscray

Read More »

Assignment Help in Yarraville, Melbourne

Introduction Yarraville is a lively inner-west suburb located approximately 9 kilometres from Melbourne’s CBD. Known for its vibrant café culture, historic architecture, and artistic vibe, Yarraville is popular among students, young professionals, and families. The suburb is conveniently located near major educational institutions such as Victoria University (Footscray Park Campus),

Read More »

Assignment Help in Wyndham Vale, Melbourne

Introduction Wyndham Vale is a rapidly growing suburb located approximately 30 kilometres southwest of Melbourne’s CBD. Known for its family-friendly environment, modern housing estates, and access to schools and community facilities, Wyndham Vale has become a popular choice for students and young families. Its proximity to educational institutions such as

Read More »

Assignment Help in Yan Yean, Melbourne

Introduction Yan Yean is a picturesque suburb located approximately 35 kilometres northeast of Melbourne’s CBD. Known for its scenic landscapes, tranquil environment, and proximity to the Yan Yean Reservoir, the suburb provides an ideal setting for students seeking a quiet and supportive location for study. Despite its rural charm, Yan

Read More »

Assignment Help in Yallambie, Melbourne

Introduction Yallambie is a tranquil suburb located approximately 18 kilometres northeast of Melbourne’s CBD. Known for its leafy streets, parks, and family-friendly environment, Yallambie provides an ideal setting for students seeking a quiet yet accessible location. Its proximity to universities and TAFE campuses, such as La Trobe University (Bundoora Campus),

Read More »

Assignment Help in Wonga Park, Melbourne

Introduction Wonga Park is a serene and leafy suburb located approximately 36 kilometres northeast of Melbourne’s CBD. Known for its natural surroundings, parks, and family-friendly environment, Wonga Park provides students with a peaceful setting for studying while still being within reach of Melbourne’s educational institutions. Nearby universities and TAFE campuses,

Read More »

Assignment Help in Westmeadows, Melbourne

Introduction Westmeadows is a peaceful suburb located about 15 kilometres northwest of Melbourne’s CBD. Known for its leafy streets, family-friendly environment, and access to quality schools, Westmeadows provides an ideal location for students who prefer a calm and supportive neighbourhood. Its proximity to educational institutions such as RMIT University, La

Read More »

Assignment Help in West Melbourne, Melbourne

Introduction West Melbourne is a bustling inner-city suburb located just 2 kilometres northwest of Melbourne’s CBD. Known for its mix of historic architecture, modern apartments, and thriving commercial zones, West Melbourne is home to a diverse population, including many students and young professionals. Its proximity to universities such as RMIT

Read More »

Assignment Help in Williamstown, Melbourne

Introduction Williamstown is a historic coastal suburb located approximately 11 kilometres southwest of Melbourne’s CBD. Known for its charming heritage buildings, marina, and vibrant café culture, Williamstown attracts students, young professionals, and families seeking a unique blend of city access and seaside living. Its proximity to Victoria University (Footscray Park

Read More »

Assignment Help in Wheelers Hill, Melbourne

Introduction Wheelers Hill is a leafy and well-established suburb located approximately 22 kilometres southeast of Melbourne’s CBD. Known for its family-friendly environment, excellent schools, and proximity to shopping precincts like The Glen Shopping Centre, Wheelers Hill is also home to a growing student population. With easy access to Monash University

Read More »

Assignment Help in Werribee South, Melbourne

Introduction Werribee South is a picturesque coastal suburb located approximately 32 kilometres southwest of Melbourne’s CBD. Known for its rich agricultural land, scenic coastline, and fresh produce markets, Werribee South attracts students and families seeking a peaceful and healthy lifestyle. Its proximity to Victoria University (Werribee Campus) and other educational

Read More »

Assignment Help in Werribee, Melbourne

Introduction Werribee is a thriving suburb located about 32 kilometres south-west of Melbourne’s CBD. Known for its rich history, family-friendly environment, and well-developed infrastructure, Werribee has become a popular choice for students and families alike. With easy access to Victoria University (Werribee Campus), RMIT, and other nearby educational institutions, students

Read More »

Assignment Help in Viewbank, Melbourne

Introduction Viewbank is a serene and leafy suburb located about 16 kilometres north-east of Melbourne’s CBD. Known for its family-friendly atmosphere, parks, and quality schools, Viewbank is an ideal location for students seeking a quiet study environment. With easy access to universities like La Trobe University (Bundoora Campus), RMIT University,

Read More »

Assignment Help in Vermont South, Melbourne

Introduction Vermont South is a vibrant suburb located 20 kilometres east of Melbourne’s CBD. Known for its leafy streets, family-friendly environment, and access to excellent schools, Vermont South offers a comfortable and supportive community for students. With nearby institutions like Deakin University (Burwood Campus), Swinburne University of Technology, and Box

Read More »

Assignment Help in Vermont, Melbourne

Introduction Vermont is a leafy and peaceful suburb located about 21 kilometres east of Melbourne’s CBD. Known for its family-friendly environment, excellent schools, and strong community vibe, Vermont attracts both families and students. With its proximity to Deakin University (Burwood Campus), Swinburne University of Technology, and Box Hill Institute, many

Read More »

Assignment Help in Truganina, Melbourne

Introduction Truganina is one of Melbourne’s fastest-growing suburbs, located about 22 kilometres west of the CBD. Known for its diversity, modern housing estates, and excellent transport connections, Truganina attracts a wide community of families, professionals, and students. Its close proximity to Victoria University (Werribee Campus), RMIT, and the University of

Read More »

Assignment Help in Travancore, Melbourne

Introduction Travancore is a small yet charming suburb located just 5 kilometres north-west of Melbourne’s CBD. Known for its tree-lined streets, historic architecture, and peaceful atmosphere, Travancore offers students a balanced lifestyle between city vibrancy and suburban comfort. With easy tram and bus connections, students can quickly reach nearby universities

Read More »

Assignment Help in Tottenham, Melbourne

Introduction Tottenham, located in Melbourne’s inner west, is a small yet significant industrial suburb known for its strong transport connections and proximity to the CBD. With Tottenham railway station providing convenient access to the city, students living in the area can easily commute to nearby educational institutions such as Victoria

Read More »

Assignment Help in Toorak, Melbourne

Introduction Toorak, located just 5 km southeast of Melbourne’s CBD, is one of the city’s most prestigious suburbs, known for its leafy streets, elegant mansions, boutique shopping, and vibrant café culture. With easy access to tram routes, South Yarra Station, and nearby educational hubs, Toorak is popular among both local

Read More »

Assignment Help in Thornbury, Melbourne

Introduction Thornbury is a vibrant suburb located just 7 km north of Melbourne’s CBD, known for its lively High Street, bustling café culture, and mix of old-world charm and modern living. With excellent tram and train connections, students in Thornbury enjoy quick access to RMIT University, University of Melbourne, and

Read More »

Assignment Help in Templestowe Lower, Melbourne

Introduction Templestowe Lower is a family-friendly suburb located 14 km north-east of Melbourne’s CBD. Known for its leafy streets, excellent schools, and vibrant community, it’s a popular choice for both families and students. With Westfield Doncaster nearby, plenty of local cafés, and easy access to public transport, the suburb offers

Read More »

Assignment Help in Templestowe, Melbourne

Introduction Templestowe is a leafy, family-oriented suburb located 16 km north-east of Melbourne’s CBD. Surrounded by scenic parklands such as Westerfolds Park and Ruffey Lake Park, Templestowe is well known for its relaxed lifestyle, quality schools, and modern amenities. With its proximity to universities like La Trobe University (Bundoora campus),

Read More »

Assignment Help in Taylors Lakes, Melbourne

Introduction Taylors Lakes is a vibrant suburb located about 23 km north-west of Melbourne’s CBD. Known for its family-friendly environment, modern housing estates, and excellent shopping centres such as Watergardens, it is one of the most popular residential areas in the Brimbank region. With convenient train and bus connections, Taylors

Read More »

Assignment Help in Sydenham, Melbourne

Introduction Sydenham is a rapidly growing suburb located approximately 22 km north-west of Melbourne’s CBD. Known for its family-friendly environment, modern residential developments, and excellent transport links, Sydenham is ideal for students seeking a suburban lifestyle while staying connected to Melbourne’s educational hubs. Nearby universities and TAFE campuses include Victoria

Read More »

Assignment Help in Surrey Hills, Melbourne

Introduction Surrey Hills is a picturesque suburb located approximately 12 km east of Melbourne’s CBD. Known for its tree-lined streets, charming period homes, and family-friendly atmosphere, Surrey Hills is ideal for students who prefer a peaceful, residential environment while remaining close to Melbourne’s educational hubs. Nearby universities and TAFE campuses

Read More »

Assignment Help in Sunshine West, Melbourne

Introduction Sunshine West is a multicultural suburb located about 15 km west of Melbourne’s CBD. Known for its vibrant community, local shopping precincts, and affordable housing, Sunshine West is a popular choice for students seeking both convenience and a supportive environment. The suburb is well-connected to universities and TAFE campuses

Read More »

Assignment Help in Sunshine North, Melbourne

Introduction Sunshine North is a vibrant suburb located approximately 13 km north-west of Melbourne’s CBD. Known for its multicultural community, residential streets, and local amenities, Sunshine North is a popular choice for students seeking affordable housing with easy access to educational institutions. Nearby universities and TAFE campuses include Victoria University

Read More »

Assignment Help in Sunshine, Melbourne

Introduction Sunshine is a bustling suburb located approximately 12 km west of Melbourne’s CBD. Known for its vibrant multicultural community, thriving shopping precincts, and excellent public transport connections, Sunshine attracts students seeking a dynamic yet accessible environment. The suburb is conveniently close to educational institutions such as Victoria University (Footscray

Read More »

Can't Find Your Assignment?