Question: java eclipse To do: You work at a nursery and keep track of the inventory of plants available. Create a class named Supplier that has

java eclipse

To do: You work at a nursery and keep track of the inventory of plants available. Create a class named Supplier that has instance variables of supplierId, companyName and phone. Include your two constructors, toString() method and getters and setters.

Create a class named Inventory that has instance variables of inventoryId, itemName, numInStock, priceEach, and Supplier. Include your two constructors, toString() method and getters and setters. Write a method named totalValue() that returns the number in stock times the price each.

Write a driver program named NurseryDriver that asks the user for the supplier id, the company name and the phone number. Create an instance of the Supplier class. Then ask the user for the number of items and loop to get the details for each (see sample output below). Create an instance of the Inventory class (let Java generate the inventory id starting at 1000). Call the toString() method of the Inventory class to print out the item. Repeat the loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!