This application is used to keep track of inventory information. A company wants to allow users
to input information about inventory items and then print a list of items in inventory that need
to be re-ordered.
There are three classes in this assignment (specific details further down) in addition to the
application main class:
The Inventory Class
o This is the class that you wrote in Assignment 1.
o You must make any necessary corrections to this class before you write this assignment.
See your Assignment 1 evaluation.
The InventoryList class
o Models an Array or List of Inventory objects that are input by the user.
The Assign2Controller class
o Has an object of the InventoryList class to store and manage the information of items in
the inventory.
o This class must contain all event handling code needed to run the application (more
details below).
All classes must be part of the same package.
1. Inventory Class
You wrote this class in Assignment 1.
You must make any corrections to this class before you finish Assignment 2.
2. InventoryList Class
The InventoryList class models a list of the inventory items entered by the user. For this
assignment it will be used to contain Inventory objects as they are input by the user. The
specs for the InventoryList class are shown in the diagram below:
Class: InventoryList
Data Members:
- invList : ArrayList
Method Members:
+ InventoryList()
+ add(inventory : Inventory) : void
+ get(index : int) : Inventory
+ length() : int
The invList member is an Array or ArrayList of Inventory objects. You can instantiate the
empty ArrayList in the same statement in which you declare it.
The add() method accepts an Inventory object to add to the invList. There is nothing
special going on here: simply add the object to invList.
The get() method accepts an integer index and returns the Inventory object at that
index, but only if the index is a valid index. If the index is invalid, the method should
simply return a null object.
The length() method returns the size of the invList (the # of elements that contain
Inventory objects).
You don't need a toString() at this time, but you could add one if you wanted to.
The UI Controls, Layout, and Styling
The Main UI
Your program has the following UI elements (specific details about functionality are outlined
later):
A label heading with the text "Inventory Tracker". The label is bound to the top of the
screen and remains centred, regardless of screen width.
Label/TextField pairs to be used for data entry by the user. There is one pair of controls
for each field input. The labels contain the String captions.
The ADD button. This button has the hot-key "A" and is used to clear the input fields so
that the user can easily type inputs for a new Inventory object.
The SAVE button. This button has the hot-key "S" and is used to save the current input
values as an Inventory object to the InventoryList. The inputs entered by the user are
validated before the Inventory object is added to the InventoryList: any errors are
displayed in Alert dialog boxes.
The ORDERS button. This button has the hot-key "O" and, when clicked, will display a list
of Inventory objects from the InventoryList that need to be re-ordered (qoh <= rop). The
list of items is displayed in the TextArea below the input area.
The EXIT button. This button is used to exit the program, upon confirmation from the
user.
The input fields and buttons are laid out in the "Input Area", in a GridPane container
(instead of AnchorPane, details later).
The Messages Label. This label is at the bottom of the UI. It is used for:
- It displays a message "No items to list. Add some." in red when the user clicks the
ORDER button while the InventoryList is empty.
- It displays a message "No items to re-order." when the user clicks ORDERS and there
are items in the InventoryList, but none that need to be re-ordered.
The UI elements must be laid out and displayed exactly as shown in the screen shots. Your UI
must contain a meaningful title in the title bar.
The UI's Functionality
Use event handlers to add control functionalities as follows:
When ADD Button is clicked or Hot key: A is used, the following tasks are done:
All text fields emptied of all text.
Depending on how you deal with the message label, you might also need to remove the
"error" from the message label at this point and empty its text.
When SAVE Button is clicked or Hot key: S is used:
Construct a new Inventory object and use the mutator methods to assign the user
inputs to each field.
Handle any error: display an Alert dialog box for the field that has the error. Note: only
show one error message at a time. Showing several error dialogs at once is extremely
cumbersome for the user. Alert dialogs appear with Inventory error messages when an
input is invalid.
If no exceptions occur: Add the new Inventory item to the InventoryList.
When ORDERS Button is clicked or Hot key: O is used:
Display only those items from the InventoryList that need re-ordering
If the InventoryList is empty, display the message "No items to list. Add some." in the
bottom message label.
If there are items in the InventoryList, display each Inventory object that needs to be re-
ordered by adding those Inventory objects to the TextArea on a separate line.
If no items get added to the TextArea, display the message "No items to re-order." in
the bottom message label.
EXIT Button
Displays an Alert dialog that asks if the user is sure that they wish to exit (Yes/No). If the
user says Yes, exit the program. If the user says no, do nothin

More Related Content

PDF
A label heading with the teid Inwentory Tracke, The boef a bourd to.pdf
DOCX
CS 2336 PROJECT 3 – Linked Inventory Management Project Due 1104 b.docx
PDF
Develop an inventory management system for an electronics store. The .pdf
PDF
Begin with the InventoryItem class and InventoryDemo fronte.pdf
PDF
This is a java lab assignment. I have added the first part java re.pdf
PDF
show code and all classes with full implementation for these Program S.pdf
PDF
I really need help with this Assignment Please in C programming not .pdf
PDF
I need to do the followingAdd a new item to the inventory m.pdf
A label heading with the teid Inwentory Tracke, The boef a bourd to.pdf
CS 2336 PROJECT 3 – Linked Inventory Management Project Due 1104 b.docx
Develop an inventory management system for an electronics store. The .pdf
Begin with the InventoryItem class and InventoryDemo fronte.pdf
This is a java lab assignment. I have added the first part java re.pdf
show code and all classes with full implementation for these Program S.pdf
I really need help with this Assignment Please in C programming not .pdf
I need to do the followingAdd a new item to the inventory m.pdf

Similar to This application is used to keep track of inventory information. A c.pdf (20)

DOCX
Program Specifications Develop an inventory management system for an e.docx
DOCX
Inventory music shop management
PPTX
Computer Programming Code Sample
DOCX
ObjectivesUse inheritance to create base and child classes.docx
DOCX
Program Specifications in c++ Develop an inventory management syste.docx
DOCX
Program Specifications in c++ Develop an inventory management system f.docx
PDF
I need this code, to show ALL inventory items, then with the remove .pdf
PDF
Write a program that mimics the operations of several vending machin.pdf
PDF
Im posting this again because the answer wasnt correct.Please .pdf
PPTX
Sales and inventory management
PDF
BELOW IS MY CODE FOR THIS ASSIGMENT BUT IT NOT WORKING WELL PLEASE H.pdf
DOCX
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
PDF
So I already have most of the code and now I have to1. create an .pdf
DOCX
Automated Restaurant System (Command Design Pattern)PROBLEMY.docx
PDF
inventory management system
PDF
Inventory management system
PPTX
Inventory Management System ppt.pptx
PPTX
AWT stands for Abstract Window Toolkit. AWT is collection of classes and int...
PPTX
Online birth certificate system and computer engineering
PPTX
Unit – I-AWT-updated.pptx
Program Specifications Develop an inventory management system for an e.docx
Inventory music shop management
Computer Programming Code Sample
ObjectivesUse inheritance to create base and child classes.docx
Program Specifications in c++ Develop an inventory management syste.docx
Program Specifications in c++ Develop an inventory management system f.docx
I need this code, to show ALL inventory items, then with the remove .pdf
Write a program that mimics the operations of several vending machin.pdf
Im posting this again because the answer wasnt correct.Please .pdf
Sales and inventory management
BELOW IS MY CODE FOR THIS ASSIGMENT BUT IT NOT WORKING WELL PLEASE H.pdf
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
So I already have most of the code and now I have to1. create an .pdf
Automated Restaurant System (Command Design Pattern)PROBLEMY.docx
inventory management system
Inventory management system
Inventory Management System ppt.pptx
AWT stands for Abstract Window Toolkit. AWT is collection of classes and int...
Online birth certificate system and computer engineering
Unit – I-AWT-updated.pptx

More from ambikacomputer4301 (20)

PDF
This is neuroscience course (masters) 1. What percent.pdf
PDF
this is my project charter..i want to prepare WBS level upto 4 lev.pdf
PDF
this is all of the information that I have please help Lab 5 In.pdf
PDF
This is a question from AI check if it is correct In which of the .pdf
PDF
This is a project management course topic . please help me A proje.pdf
PDF
This is Canadian Accounting Nova Gold Miners (NGM) is a gold mining.pdf
PDF
This is for Object oriented and analysis thank youConsider a syste.pdf
PDF
Todas las siguientes afirmaciones describen correctamente alguna par.pdf
PDF
Todas las siguientes afirmaciones describen con precisi�n una comuni.pdf
PDF
To what extent do you believe that social media is or is not ubiquit.pdf
PDF
This data shows the relation between Tucson and Phoenixs airports a.pdf
PDF
To examine the potential effects on the transmission of dengue, Bian.pdf
PDF
To create a 2D graphics scene using the HTML canvas element. The ide.pdf
PDF
To complete this discussion, please base your work on Enron, WorldCo.pdf
PDF
Title Is it a Planned ShowMrs. Jancy works with TBL global servic.pdf
PDF
This assignment is using Logism to create circuits. I have been tryi.pdf
PDF
Tide is conducting market research to assess a new detergent theyre.pdf
PDF
Throughout the course project, your persona is that of a data analys.pdf
PDF
Three students, Habib, Vikki and Claire, in Bio 200 ran their sample.pdf
PDF
Three randomly selected children are surveyed. The ages of the child.pdf
This is neuroscience course (masters) 1. What percent.pdf
this is my project charter..i want to prepare WBS level upto 4 lev.pdf
this is all of the information that I have please help Lab 5 In.pdf
This is a question from AI check if it is correct In which of the .pdf
This is a project management course topic . please help me A proje.pdf
This is Canadian Accounting Nova Gold Miners (NGM) is a gold mining.pdf
This is for Object oriented and analysis thank youConsider a syste.pdf
Todas las siguientes afirmaciones describen correctamente alguna par.pdf
Todas las siguientes afirmaciones describen con precisi�n una comuni.pdf
To what extent do you believe that social media is or is not ubiquit.pdf
This data shows the relation between Tucson and Phoenixs airports a.pdf
To examine the potential effects on the transmission of dengue, Bian.pdf
To create a 2D graphics scene using the HTML canvas element. The ide.pdf
To complete this discussion, please base your work on Enron, WorldCo.pdf
Title Is it a Planned ShowMrs. Jancy works with TBL global servic.pdf
This assignment is using Logism to create circuits. I have been tryi.pdf
Tide is conducting market research to assess a new detergent theyre.pdf
Throughout the course project, your persona is that of a data analys.pdf
Three students, Habib, Vikki and Claire, in Bio 200 ran their sample.pdf
Three randomly selected children are surveyed. The ages of the child.pdf

Recently uploaded (20)

PPTX
Education and Perspectives of Education.pptx
PPTX
Virtual and Augmented Reality in Current Scenario
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PPTX
Computer Architecture Input Output Memory.pptx
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Education and Perspectives of Education.pptx
Virtual and Augmented Reality in Current Scenario
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
Hazard Identification & Risk Assessment .pdf
Introduction to pro and eukaryotes and differences.pptx
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Uderstanding digital marketing and marketing stratergie for engaging the digi...
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Cambridge-Practice-Tests-for-IELTS-12.docx
Environmental Education MCQ BD2EE - Share Source.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Race Reva University – Shaping Future Leaders in Artificial Intelligence
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
Computer Architecture Input Output Memory.pptx
FORM 1 BIOLOGY MIND MAPS and their schemes
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf

This application is used to keep track of inventory information. A c.pdf

  • 1. This application is used to keep track of inventory information. A company wants to allow users to input information about inventory items and then print a list of items in inventory that need to be re-ordered. There are three classes in this assignment (specific details further down) in addition to the application main class: The Inventory Class o This is the class that you wrote in Assignment 1. o You must make any necessary corrections to this class before you write this assignment. See your Assignment 1 evaluation. The InventoryList class o Models an Array or List of Inventory objects that are input by the user. The Assign2Controller class o Has an object of the InventoryList class to store and manage the information of items in the inventory. o This class must contain all event handling code needed to run the application (more details below). All classes must be part of the same package. 1. Inventory Class You wrote this class in Assignment 1. You must make any corrections to this class before you finish Assignment 2. 2. InventoryList Class The InventoryList class models a list of the inventory items entered by the user. For this assignment it will be used to contain Inventory objects as they are input by the user. The specs for the InventoryList class are shown in the diagram below: Class: InventoryList Data Members: - invList : ArrayList Method Members: + InventoryList() + add(inventory : Inventory) : void + get(index : int) : Inventory + length() : int The invList member is an Array or ArrayList of Inventory objects. You can instantiate the empty ArrayList in the same statement in which you declare it.
  • 2. The add() method accepts an Inventory object to add to the invList. There is nothing special going on here: simply add the object to invList. The get() method accepts an integer index and returns the Inventory object at that index, but only if the index is a valid index. If the index is invalid, the method should simply return a null object. The length() method returns the size of the invList (the # of elements that contain Inventory objects). You don't need a toString() at this time, but you could add one if you wanted to. The UI Controls, Layout, and Styling The Main UI Your program has the following UI elements (specific details about functionality are outlined later): A label heading with the text "Inventory Tracker". The label is bound to the top of the screen and remains centred, regardless of screen width. Label/TextField pairs to be used for data entry by the user. There is one pair of controls for each field input. The labels contain the String captions. The ADD button. This button has the hot-key "A" and is used to clear the input fields so that the user can easily type inputs for a new Inventory object. The SAVE button. This button has the hot-key "S" and is used to save the current input values as an Inventory object to the InventoryList. The inputs entered by the user are validated before the Inventory object is added to the InventoryList: any errors are displayed in Alert dialog boxes. The ORDERS button. This button has the hot-key "O" and, when clicked, will display a list of Inventory objects from the InventoryList that need to be re-ordered (qoh <= rop). The list of items is displayed in the TextArea below the input area. The EXIT button. This button is used to exit the program, upon confirmation from the user. The input fields and buttons are laid out in the "Input Area", in a GridPane container (instead of AnchorPane, details later). The Messages Label. This label is at the bottom of the UI. It is used for: - It displays a message "No items to list. Add some." in red when the user clicks the ORDER button while the InventoryList is empty. - It displays a message "No items to re-order." when the user clicks ORDERS and there are items in the InventoryList, but none that need to be re-ordered. The UI elements must be laid out and displayed exactly as shown in the screen shots. Your UI
  • 3. must contain a meaningful title in the title bar. The UI's Functionality Use event handlers to add control functionalities as follows: When ADD Button is clicked or Hot key: A is used, the following tasks are done: All text fields emptied of all text. Depending on how you deal with the message label, you might also need to remove the "error" from the message label at this point and empty its text. When SAVE Button is clicked or Hot key: S is used: Construct a new Inventory object and use the mutator methods to assign the user inputs to each field. Handle any error: display an Alert dialog box for the field that has the error. Note: only show one error message at a time. Showing several error dialogs at once is extremely cumbersome for the user. Alert dialogs appear with Inventory error messages when an input is invalid. If no exceptions occur: Add the new Inventory item to the InventoryList. When ORDERS Button is clicked or Hot key: O is used: Display only those items from the InventoryList that need re-ordering If the InventoryList is empty, display the message "No items to list. Add some." in the bottom message label. If there are items in the InventoryList, display each Inventory object that needs to be re- ordered by adding those Inventory objects to the TextArea on a separate line. If no items get added to the TextArea, display the message "No items to re-order." in the bottom message label. EXIT Button Displays an Alert dialog that asks if the user is sure that they wish to exit (Yes/No). If the user says Yes, exit the program. If the user says no, do nothin