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 28, 2022) 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 28, 2022, 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 28, 2022,<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 28, 2022]. 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 28, 2022. 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 28, 2022]

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.

Get 45%* OFF on Assignment Help

Popular Assignments

VU22977 – Practice in a Legal Environment

Advanced Diploma of Legal Practice – 22565VIC PORTFOLIO- CLIENT MATTER FILE Assessment task 1 Prepare a comprehensive portfolio of documents to create a Client Matter File which must include: Element 1 Area of law Cover sheet stating client name and short description of legal matter Client Instruction Sheet, Costs Agreement

Read More »

KIT714 ICT Research Principles: Assignment 1

Practical Qualitative Research Exercise                                                                                                                                         Type:                 In-Semester, Individual Assignment Task Length:   minimum 2,000 words Weighting:     20% of total assessment for this unit Due Date:       Friday 5 August 2022 – 11:55 pm (Week05) Submission:    electronic submission on MyLO (WORD or PDF) Description:    This practical exercise will engage students in a qualitative research

Read More »

MODULE 44-704463 Dissertation Help

ASSESSMENT CRITERIA Dissertation (12,500 words) Deadline: JULY 29th 2022, 3pm Introduction and abstract  Situates the research question within the, theory, and concepts Explains the value of the study.  Relevance of the research question, to the field of study is fully justified. Leads logically into the Literature Review. Abstract of professional

Read More »

ITECH1103-Assignment: Assignment 2: Analytics Report

Overview The purpose of this task is to provide students with practical experience in writing a data analytical report to provide useful insights, patterns, and trends in a chosen dataset in the light of a set of tasks required within this document. This dataset will be chosen from the UC

Read More »

PBHL20001 Term 1, 2022 – Supplementary Assessment

PBHL20001 Term 1, 2022 Supplementary Assessment The influenza pandemic that followed World War I and took place over the period from 1918-1920 resulted in an estimated 100 million deaths worldwide and 500 million infections. In addition, this pandemic had a significant impact on public health practice throughout the 20th century

Read More »

Community Health Project 1 (HLTH 3058): Assessment 2: Portfolio Task 2

Community Health Project 1 (HLTH 3058) Assessment 2: Portfolio Task 2 – Evaluative Framework Marking Guide Weighting: 15% the total grade for the course   Criteria Outstanding performance (75-100%) Exceeds core requirements (65-74%) Meets core requirements (50-64%) Does not meet requirements (<50%) Comments Content (70%) Demonstrates adequate knowledge of integrating

Read More »

Community Health Project 1 (HLTH 3058): Assessment 2: Portfolio Task 1

Community Health Project 1 (HLTH 3058)Assessment 2: Portfolio Task 1 – Ethical Considerations Marking GuideWeighting of 15% the total grade for the course Criteria Outstanding performance (75-100%) Exceeds core requirements (65-74%)   Meets core requirements (50-64%) Does not meet requirements (<50%) Comments CONTENT (80%) Ethical Considerations   Demonstrates adequate knowledge

Read More »

SAM 11486/SAM G 6677: Assignment 1 – Individual

Assignment 1 – Individual (25%) Report Due: 11:59pm Sunday Week 5 04/09/2022 This assignment will be marked out of 25 marks and is worth 25% of the overall mark for the unit. Please check the unit outline for late penalties and restrictions on late submissions. This assignment is an individual

Read More »

11486 Systems Analysis and Modelling

Assignment Case Study C – Feed Me Now Disclaimer: The situation described in the following case study is fictional, and bears no resemblance to any persons, businesses, or organisations, living or dead. Any such resemblance, if exists, is merely co-incidental in nature, and is not intentional. Feed Me Now is

Read More »

MAA703 – Accounting for Management

Trimester 2 2022 Assessment Task 2 Part B – Teamwork Reflection (Individual) DUE DATE AND TIME:                        Wednesday, 7 September 2022 by 8:00pm (AEST) PERCENTAGE OF FINAL GRADE:    10% WORD COUNT:                                   750 – 800 words Description Teamwork is one of the vital components of many workplaces and the ability to demonstrate

Read More »

Research project assessment proforma and marking schemes

BSc Biomedical Sciences with Health, Exercise and Nutrition (HEN6004) and BSc Biomedical Science (APS6022) Instructions for use All forms must be completed electronically and uploaded to the student submission point in  turnitin. Please note the literature review assessment will be completed in January whereas the assessment of the paper/poster and

Read More »

XERO and Spotlight reporting software Report Assignment

Case facts – Read me carefully please City Infrastructure Holdings Ltd (CIH) and Network Maintenance Services Ltd (NMS) City Infrastructure Holdings Ltd (CIH) acquired 100% of the 300,000 issued shares in Network Maintenance Services (NMS) on 1 July 2021.  The consideration provided to shareholders of NMS consisted of $1.20 in cash plus 1

Read More »

KIT103 Computational Science

School of Information and Communication Technology College of Sciences and Engineering Unit Outline KIT103 Computational Science Semester 2, 2022 Sandy Bay Campus, Hobart Newnham Campus, Launceston COVID-19 (Coronavirus Information) For information on how you can help keep us all safe, please review the Coronavirus updates page here: https://www.utas.edu.au/about/safety-security-and-wellbeing/coronavirus Sections that

Read More »

SEN725 Urban Stormwater Asset Design

Assessment Task -4 Final Report – Analysis of CoGG Stormwater Network Weight 50% This is an individual assessment task. Plagiarism and collusion is unacceptable practice at Deakin University. You must appropriately reference your work. Failure to do so will result in disciplinary action. For more information on plagiarism and collusion,

Read More »

PSY3PRP 2022 Assignment 2: Research Project Report

PSY3PRP 2022 Assignment 2: Research Project Report Guidelines and Marking Rubric Individual Research Report due Wednesday 19th October 11.59pm (50% of total grade) For this assignment—with support through structured tutorial work across much of the semester— you will produce an individually-written report on the broad topic of feeding difficulties in

Read More »

Increasing Demand for assignment help in Namibia

With the growing population, the demand for clean energy, advanced technology, new structures, and better healthcare is escalating day by day which makes engineering the most popular degree for the youth. As more people pursue engineering nowadays, it also makes it one of the most difficult and competitive degrees also.

Read More »

Online Assignment Help in Germany

How Could You Do Exam Preparation Effectively? Exam time is full of challenges and difficulties. You have to juggle exams even in high school, college, or higher education. It defines your knowledge of a specific subject and how well you know the curriculum. The exam also tests how much you

Read More »

Get Excellent Human Values Assignment Help Immediately

Get Excellent Human Values Assignment Help Immediately: Expert Solutions to all your Queries Instant Human Values Assignment Help Online Students can get Human Values assignment help online in a fast and simple way from the experts at Universal Assignment Help Service. Their team of over 172+ subject experts works every

Read More »

Get Top Modern History Assignment Help Online

Order Modern History Assignment Help immediately Students often need modern history assignment help for many reasons. Getting immediate online help for assignments helps students boost their academics in incredible ways. Sometimes, the pressure of studies is too much to take for students. This causes them to score poor grades and

Read More »

Get Instant Assignment Help in the United Arab Emirates

How Can Assignments Help Students? Whatever the definition of homework is, one thing is certain: it helps students thoroughly learn the concepts they have studied in class. The number of such assignments may cause stress or a burden. It means students and tutors are both correct in their type of

Read More »

Assignment Help in Mexico

How to Gain Awesome Grades in Your Chemistry Subject? Whether you are pursuing a technical degree or studying in the science stream, chemistry is always at the forefront. If you love to observe reactions, molecules, acids, condensation, evaporation, and dilution, chemistry will prove a resource for getting outstanding academic marks.

Read More »

Assignment Help in Kenya

How Could You Find the Best Biology Homework Website? Getting online homework help from an expert is neither embarrassing nor unauthentic. The vast majority of students around the world believe that doing online assignments and tutoring is beneficial. The Standard Graduate School of Education revealed that 56% of students suffer

Read More »

Assignment Help in Bangladesh

The Best 6 Hacks to Shortlist the Top Civil Engineering Assignment Tutor? Finding a homework expert for civil engineering assignments is a hectic task. As civil engineering has several fields, getting expertise is difficult for tutors. You may struggle to receive civil engineering assignment help in Bangladesh due to this

Read More »

Assignment Help in Pakistan

What Will Unethical Occur from Getting Homework? Homework looks like a mode of learning in most cases. But what happens to its quantity? Its quantity should be more than enough for students. Such circumstances may be detrimental to the health of the pupils. Sometimes, college faculties or teachers forget to

Read More »

Assignment Help in Malaysia

The Best 4 Skills You Should Learn For Making Your Career in 2022 As technological innovations leap forward daily, new skills are entering our market. Sticking to one skill set enables you to lose lucrative job opportunities. That is why it gives importance to having diverse skills, which should be

Read More »

MKT200 Marketing Principles: Infographic

Assessment 2 Information Subject Code: MKT200 Subject Name: Marketing Principles Assessment Title: Infographic Assessment Type: Individual infographic Length: Two pages Weighting: 30% Total Marks: 100 Submission: Online Due Date: Week 9 Your task Individually, you are required to create a two-page infographic outlining the communications process of two competitor brands.

Read More »

MMP-223, Property and Real Estate Law and Practice

MMP-223, Property and Real Estate Law and Practice, Trimester 2, 2022 Assignment 2, Client Report, Individual Assignment 25% of Unit Assessment (1,250 words*) Due Date: September 16, 2022, 8-pm AEST Assignment Brief: Clyde, being a real estate agent, loves property. With his share of the sale of the Sorrento property

Read More »

NUR1398 – Foundations of Nursing Practice Theory

Assessment: Care Plan Report Task overview Course NUR1398 – Foundations of Nursing Practice Theory Brief task description Written care plan addressing nursing care requirements for older patients with degenerative conditions. Rationale for assessment task Registered Nurses are required to think through the different aspects of patient care to arrive at

Read More »

MBA641 Project Strategy Framework

Assessment 1 Information Subject Code: MBA641 Subject Name: Strategic Project Management Assessment Title: Project Strategy Framework Assessment Type: Length: Individual video recording and supporting Infographic Video: 10-minute (no more) Supporting infographic: 1 page (no more) Weighting: 30% Total Marks: Submission: 100 Online Due Date: Week 4 Your task You are

Read More »

SEJ201 Structural Design Assessment

SEJ201 Structural Design Assessment Task 5 FINAL PROJECT REPORT Summary The Final Project Report is an individual task which builds on teamwork completed earlier in the trimester. This report shall clearly explain and justify the design solution proposed. In this report students you should identify project scope, inputs and constraints,

Read More »

42907 Design for Durability

Introduction Overall, explain what readers will find in the report, general information about the structure, location, climatic conditions, detail which specific parts of the structure will be designed according to which Australian standard. Which type of foundation, why? You can use figures in this section. Provide the scope of the

Read More »

Can't Find Your Assignment?

Open chat
1
Free Assistance
Universal Assignment
Hello 👋
How can we help you?