You are working for a small manufacturing organization that has outgrown its current inventory system. Members of the organization have been using a spreadsheet program to manually enter inventory additions, deletions, and other data from a paper-based system but would now like you to develop a more sophisticated inventory program.
You have been provided with a mock-up of the user interface to use in the design and development of the system (see the attached "Software 1 GUI Mock-Up") and a class diagram to assist you in your work (see the attached UML Class Diagram). The organization also has specific business requirements that must be considered for the application. A systems analyst created the solution statements outlined in the requirements section of this task based on the business requirements. You will use these solution statements to develop your application.
A. Create a JavaFX application with a graphical user interface (GUI) based on the attached "Software 1 GUI Mock-Up." You may use JavaFX with or without FXML to create your GUI, or you may use Scene Builder to create your FXML file; use of Swing is not permitted. The user interface (UI) should closely match the organization of the GUI layout and contain all UI components (buttons, text fields, etc.) in each of the following GUI mock-up forms:
Note: You may use one FXML file for forms with an identical UI component structure. You may also use a single window that can be switched to a different menu, or a new window can be launched for each form. As of JDK 11, JavaFX is no longer included in the JDK API but is available as an SDK or module.
B. Provide Javadoc comments for each class member throughout the code, and include a detailed description of the following in your comments:
Note: For these comments to accurately export to the Javadoc comments, please add the logical and runtime error comments in the method header declaration comments where the error that was corrected occurred, and include the future enhancement comments in the comments of the main class. Please start these comments with "RUNTIME ERROR" or FUTURE ENHANCEMENT as applicable.
C. Create classes with data and logic that map to the UML class diagram and include the supplied Part class provided in the attached "Part.java." Do not alter the provided class. Include all the classes and members as shown in the UML diagram. Your code should demonstrate the following:
D. Add the following functionalities to the Main form:
1. The Parts pane
2. The Products pane
Note: A product's associated parts can exist independent of current inventory of parts. You are not required to display sample data upon launching your application. You do not need to save your data to a database or a file; data for this application is nonpersistent and will reside in computer memory while in use.
E. Add the listed functionalities to the following parts forms:
1. The Add Part form
2. The Modify Part form
F. Add the following functionalities to the following product forms:
1. The Add Product form
Note: When a product is deleted, so can its associated parts without affecting the part inventory. The Remove Associated Part button removes a selected part from the bottom table. (This dissociates or removes a part from a product.)
2. The Modify Product form
Note: The Remove Associated Part button removes a selected part from the bottom table. (This dissociates or removes a part from a product.)
G. Write code to implement input validation and logical error checks using a dialog box or message in the UI displaying a descriptive error message for each of the following circumstances:
H. Provide a folder containing Javadoc files that were generated from the IDE or via the command prompt from part B. In a comment above the main method header declaration, please specify where this folder is located.
Part.java
public abstract class Part {
private int id;
private String name;
private double price;
private int stock;
private int min;
private int max;
public Part(int id, String name, double price, int stock, int min, int max) {
this.id = id;
this.name = name;
this.price = price;
this.stock = stock;
this.min = min;
this.max = max;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the price
*/
public double getPrice() {
return price;
}
/**
* @param price the price to set
*/
public void setPrice(double price) {
this.price = price;
}
/**
* @return the stock
*/
public int getStock() {
return stock;
}
/**
* @param stock the stock to set
*/
public void setStock(int stock) {
this.stock = stock;
}
/**
* @return the min
*/
public int getMin() {
return min;
}
/**
* @param min the min to set
*/
public void setMin(int min) {
this.min = min;
}
/**
* @return the max
*/
public int getMax() {
return max;
}
/**
* @param max the max to set
*/
public void setMax(int max) {
this.max = max;
}
}
Figure: see image.
1. Main Form: see image.
The Main form contains a Parts pane and a Products pane with TableViews of parts and products; a search field; buttons to add, modify, and delete parts and products; and an Exit button as described in the assessment.
2. Add Part form: see image.
Two views of the same form are shownone for each of the radio buttons. The user has the option to select In-House or Outsourced to categorize the part. If the user selects Outsourced, the Company Name field is available. If the user selects In-House, the Machine ID field is available. The Inv field stores the number of units of the product that the company currently have available. The Min field stores the requirement for the minimum number of product items that must be available by the company at any given time, and the Max field denotes the maximum number of product items that the company can store. The values of the filed Inv, therefore, must be integers between the values stored in the fields Min and Max.
3. Modify Part form : see image.
Two views of the same form are shownone for each of the radio buttons. The user has the option to select In-House or Outsourced to categorize the part. If the user selects Outsourced, the Company Name field is available. If the user selects In-House, the Machine ID field is available. The Modify Part form has the same functionality as the Add Part form, but the fields are populated with data that was previously entered and saved. The ID field is still disabled but now displays the selected part's ID.
4. Add Product form: see image.
The Add Product form contains product information, a top TableView containing all the part data to choose from, and a bottom TableView with the associated part data.
5. Modify Product form: see image.
Modify Product form has the same functionality as the Add Product form, but the parts and fields are populated with data that was previously entered and saved.