Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Beginner Question: As you can see from the class diagram below, there are three classes. The Item class which maintains information about particular item.
Java Beginner Question:
As you can see from the class diagram below, there are three classes. The Item class which maintains information about particular item. One instance is one item. The Inventory class uses an array to maintain all the Items in the inventory. The InventoryTrackerlnterface class creates an instance of Inventory and talks to the user to perform operations. As such this will be the class that has the main method. Inventory InventoryTrackerInterface tinv: Inventory main (O -itemArray: Item [100] -total!tems : int = 0 +getTotalNumberOfItems): int +getItem (index:int) Item +addItem (newItem: Item) void +saveInventoryToFile (fileName:String): void loadInventoryFromFile (fileName String) v01 Item name String quantity: int -price: double -upc: String -Item() +Item (name:String, qty:int,price:double, upc:String) +getName String +getQuantity ): int +getPrice ): double +getUPC: String To receive the 20 points for this assignment you must create the stubs of these classes. That is to say, use the class diagram to create each of the three classes, their attributes, and the methods, but DO NOT fill in the methods/constructors with actual code. If a method has a return type that is not void, simply return a literal value (or null in the case of a class). Do not use special class diagram software to do this... you, equipped with just eclipse, are the special software in this case. Once you are complete upload the three .java filesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started