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 (March 31, 2026) 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 - March 31, 2026, 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 March 31, 2026,<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 March 31, 2026]. 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 March 31, 2026. 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: March 31, 2026]

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.

Categories

Get 90%* Discount on Assignment Help

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 Writing Services: A Complete Guide for Students

Introduction Academic pressure is increasing every year, and students are expected to deliver high-quality assignments within strict deadlines. Managing multiple subjects, complex topics, and limited time can be overwhelming. This is why assignment writing services have become a popular choice among students. In this guide, we’ll explore what assignment writing

Read More »

Coursework Writing Help: Everything Students Need to Know

Introduction Coursework plays a crucial role in a student’s academic journey, contributing significantly to final grades. However, managing coursework alongside exams, assignments, and personal commitments can be challenging. Many students struggle to maintain quality while meeting deadlines. This is where coursework writing help becomes a valuable solution. In this guide,

Read More »

Homework Help Online: A Smart Solution for Students

Introduction Homework is a daily part of student life, but it’s not always easy to manage. With multiple subjects, tight schedules, and increasing academic pressure, students often find it difficult to complete their homework on time. This is where homework help online becomes a practical and reliable solution. In this

Read More »

Assignment Help Online: A Complete Solution for Students

Introduction With the rise of digital education, students are increasingly turning to online platforms for academic support. Managing multiple assignments, tight deadlines, and complex topics can be overwhelming, especially when time is limited. This is where assignment help online becomes a reliable and effective solution. In this guide, we’ll explore

Read More »

Common Challenges Students Face

Thesis writing can be difficult due to: These challenges often lead students to seek expert guidance. Benefits of Thesis Writing Help 1. Professional Expertise Students receive support from experienced academic writers and researchers. 2. High-Quality Research Experts ensure accurate, well-structured, and detailed content. 3. Time Management Students can focus on

Read More »

Thesis Writing Help: A Step-by-Step Guide for Students

Introduction Writing a thesis is a major academic milestone that requires extensive research, critical thinking, and structured writing. For many students, it can be one of the most challenging parts of their academic journey. Tight deadlines, complex topics, and lack of guidance often make the process overwhelming. This is where

Read More »

Case Study Writing Help: A Practical Guide for Students

Introduction Case studies are an essential part of academic learning, especially in fields like business, management, healthcare, and law. They require students to analyze real-life scenarios, identify problems, and provide practical solutions. However, many students find case study writing challenging due to its analytical nature and structured format. This is

Read More »

Common Challenges Students Face

Dissertation writing can be difficult due to: These challenges often lead students to seek professional guidance. Benefits of Dissertation Writing Help 1. Expert Academic Support Students get assistance from experienced researchers and subject experts. 2. High-Quality Research Work Professionals ensure well-structured, detailed, and accurate content. 3. Time Management Outsourcing complex

Read More »

Dissertation Writing Help: A Complete Guide for University Students

Introduction Writing a dissertation is one of the most challenging tasks in a student’s academic journey. It requires deep research, critical analysis, and a clear understanding of the subject. For many students, managing such a complex project alongside other responsibilities can be overwhelming. This is where dissertation writing help becomes

Read More »

Essay Writing Help: The Ultimate Guide for Students

Introduction Essay writing is a fundamental part of academic life, but it’s not always easy. From understanding the topic to structuring ideas and maintaining proper formatting, students often face multiple challenges. Tight deadlines and academic pressure only make things harder. That’s why essay writing help has become a popular solution

Read More »

How Assignment Help Services Are Changing the Way Students Study

Introduction The traditional way of studying—long hours, heavy books, and constant pressure—is slowly evolving. Today’s students are looking for smarter, faster, and more efficient ways to succeed academically. This shift has led to the growing popularity of assignment help services. Platforms like Universal Assignment are playing a key role in

Read More »

The Ultimate Guide to Assignment Help Services for Modern Students

Introduction In today’s fast-paced academic world, students are expected to handle multiple assignments, projects, and deadlines all at once. Managing everything perfectly can be challenging, especially when time is limited. That’s why assignment help services are becoming an essential part of student life. Platforms like Universal Assignment provide the support

Read More »

Tired of Assignment Pressure? Here’s a Smarter Way to Handle It

Introduction Assignments are an essential part of academic life, but they often come with tight deadlines, complex topics, and constant pressure. If you’ve ever felt overwhelmed trying to keep up, you’re definitely not alone. The good news? There’s a smarter way to manage it all. Assignment help services, like Universal

Read More »

Why Online Assignment Help Is the Future of Smart Learning

Introduction The way students learn is changing rapidly. With digital platforms, online classes, and remote learning becoming the norm, traditional study methods are evolving. In this new era, online assignment help services are emerging as a powerful tool for students who want to stay ahead. Platforms like Universal Assignment are

Read More »

Assignment Help Services: The Secret to Balancing Studies and Life

Introduction Balancing studies with personal life is one of the biggest challenges students face today. Between lectures, assignments, exams, and sometimes even part-time jobs, it can feel like there’s no time left to breathe. This is where assignment help services come into the picture. Platforms like Universal Assignment are helping

Read More »

The Smart Student’s Guide to Using Assignment Help Effectively

Introduction In today’s competitive academic environment, being a “smart student” isn’t just about studying harder—it’s about using the right resources at the right time. With increasing workload and limited time, many students are turning to assignment help services to stay ahead. Platforms like Universal Assignment are not just about completing

Read More »

How Assignment Help Services Can Boost Your Productivity and Grades

Introduction Student life today is more demanding than ever. With multiple subjects, strict deadlines, and constant pressure to perform, staying productive can be a real challenge. Many students struggle to keep up, often sacrificing sleep or personal time just to complete assignments. This is where assignment help services step in

Read More »

Why Assignment Help Services Are a Game-Changer for Students in 2026

Introduction Let’s be real—student life isn’t as easy as it looks. Between classes, deadlines, part-time work, and personal commitments, managing everything can feel overwhelming. That’s exactly why assignment help services are becoming more popular than ever. Platforms like Universal Assignment are helping students stay ahead without burning out. The Rising

Read More »

Assignment Help Services: A Smart Solution for Academic Success

Introduction In today’s competitive academic landscape, students are constantly under pressure to perform well while managing multiple responsibilities. From tight deadlines to complex topics, academic life can quickly become overwhelming. This is where professional assignment help services, like Universal Assignment, play a vital role. These services provide expert assistance, helping

Read More »

The Importance of Assignment Help Services for Academic Success

In today’s fast-paced academic environment, students often face immense pressure to perform well across multiple subjects while balancing personal and professional commitments. This is where professional assignment help services come into play. Platforms like Universal Assignment provide students with the support they need to manage their workload efficiently and achieve

Read More »

SOP Writing Help: A Complete Guide for Students

Introduction A Statement of Purpose (SOP) is one of the most important documents for students applying to universities abroad. It reflects your academic background, career goals, and motivation for choosing a particular course or institution. However, writing a compelling SOP can be challenging. This is where SOP writing help becomes

Read More »

NUR246 Assessment 2 Workbook

[OFFICIAL]NUR246 Assessment 2 Workbook.This workbook assessment addresses the following unit learning outcomes:ULO1. Demonstrate critical thinking and clinical reasoning at a semester 4 level when caring for individuals and groups in community and primary health care settings.ULO3. Describe the importance of health promotion, health education and behaviour change to implementing person-centred

Read More »

TCHR5010: Competency and capability of Preschoolers

TCHR5010: Competency and capability of PreschoolersAssessment Two: PortfolioInformation BookletAssessment name:Portfolio of planning cycle Due Date: This MonthWeighting:50% Length:2000 words Task Description:This Portfolio is comprised of two tasks. You must submit your assessment as one document.Task 1: Anecdotal record and learning experienceAnecdotal recordView the video of pre-schoolers provided under the link

Read More »

Nursing Homework Assistance: Professional Support for Nursing Learners

Nursing is a highly challenging and honorable field that demands in-depth knowledge of healthcare practices, patient management, and clinical procedures. Alongside practical training, students must handle numerous academic tasks, which can become overwhelming. This is where nursing homework assistance services play a crucial role in helping students maintain a balance

Read More »

Nursing Assignment Help: Expert Academic Support for Nursing Students

Nursing is one of the most demanding and respected professions, requiring a strong understanding of medical concepts, patient care, and clinical practices. However, nursing students often face intense academic pressure due to complex assignments, practical training, and strict deadlines. This is where nursing assignment help services provide essential support to

Read More »

Can't Find Your Assignment?