Question: Create a program in Java language: In this assignment you will create a class called RetailItem that will hold the information about a specific item.
Create a program in Java language:
| In this assignment you will create a class called RetailItem that will hold the information about a specific item.
It will:
Keep track of how many of that specific item are in your inventory. Include a short description of the item. Include the cost of the item. Print out the Description, how many are in inventory, and the cost of the item.
This class will be used in a bigger program to keep track of inventory and for placing orders. |
RetailItem Class Requirements
| Instance data variable for the description. This will be a String. Instance data variable for the quantity of the item in the inventory. This will be an integer. Instance data variable for the price of the item. This will be a double. Mutator methods: Set Method for each description, unit on hand, price. Accessor methods: Get Method for each description, unit on hand, price. A toString method to display all of the above information for the item: Description, Quantity, and Price. |
RetailDriver Class Requirements
| Creates 3 instance of the RetailItem class: Item1, Item2, and Item3. Populates each instance of RetailItem with the correct data as shown in the table below. Displays the data in the 3 Retail classes in a table format as shown below. Format the price as currency. |
NOTE: The lines are there to only give you a better idea of how to format the output. Do not attempt to display the lines.
| Item | Description | Units on Hand | Price |
| Item #1 | Hammer | 12 | 25.99 |
| Item #2 | Circular Saw | 40 | 89.99 |
| Item #3 | Drill | 25 | 75.99 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
