Write an inventory manager program in Java. The information about what stock you have on hand is stored in a ?le. Your program will read the items you have in stock from a ?le. Each line read from the...

Write an inventory manager program in Java. The information about what stock you have on hand is stored in a ?le. Your program will read the items you have in stock from a ?le. Each line read from the ?le will be an Item object. There will be 10 in total. The Item objects created MUST be stored in an Array of Item objects. The array size will be 10. Once your inventory is loaded your program will do the four following operations: 1 Print Inventory 2 Check for low Inventory 3 Print Current Value of Inventory 4 Exit Program. Assignment Steps: 1 Setting up Project: 1.1 Create a Project named InventoryManager 1.2 Add a ?le named Item to your project. 1.3 Download the items ?le File: Paper 10 5.99 ColoredPaper 10 6.99 PaperClips 55 0.99 Staples 1000 0.10 Chairs 3 49.99 Pens 500 0.75 Pencils 500 .10 Highlighters 100 1.00 Toner 2 69.99 Post-its 100 1.99 1.4 Copy/Move the ?le to the project folder named InventoryManager. This should be inside your NetBeans Project Folder. 2 Implement Item.java Class: 2.1 Create three data ?elds : name , quantity, and price per unit. 2.2 Create a no-arg constructor that initializes NO data ?elds and a constructor that initializes ALL data ?elds. 2.3 Create all getters and setters for each data ?eld. 2.4 Implement a toString method that builds a nicely formatted string representing an Item object. YOU ARE NOT ALLOWED to print from this method. IT MUST return a String 3 Implement InventoryManager.java Class, do the following: – Write a class method called printInventory which takes an Array of Items as its parameter. This method will print the entire inventory to the console. – Write a class method called checkLowInventory which takes an Array of Items as its parameter. This method checks for items that have fewer quantity than 5, and prints them in the same format as printInventory does. If there is no such item then print an appropriate message. – Write a class method called totalInventoryValue which takes an Array of Items as its parameter. This method computes the total value of the current inventory using the quantity and price per unit information, and prints that total value to the console. In the main method: 3.1 Use File class and Scanner class to read the items and related information from the ?le provided with this assignment. It is available on ilearn. 3.2 For every item in this ?le create a new object of the Item class with appropriate values. 3.3 Let all the objects be a part of an array. There are 10 items in the ?le. 3.4 Then print the following menu to the console : PrintInventory (p) Check Low inventory (c) Print Total Value of inventory (v) Exit (e) 3.5 Prompt the user to enter an option. Read this option in as a char. You can assume they will enter a lower case character and that the input will be valid. 3.6 Depending on the option entered you will do the following: * If the user enters p, call printInventory method * If the user enters c, call checkLowInventory method * If the user enters v, call totalInventoryValue method * If the user enters e, Program Exits 3.7 Loop steps 3.4 to 3.6 until the user enters e as an option.
May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here