Question: You are to write a java program that allows the user to calculate the cost of a set of items in inventory. The user will

You are to write a java program that allows the user to calculate the cost of a set of items in inventory. The user will enter the item name, the cost of the item, and the quantity of the item on hand. After entering these values, the user will then be able to see a summary of the total value of that item. [3 marks]

Sample program interaction (prompts in black, user input in blue) with output at the end is green:

Enter product name: Notebook

Enter product cost: 11.25

Enter quantity on hand: 3

Total value of Notebook: $33.75

The final total displayed in the output must be formatted with a dollar sign and exactly two digits after the decimal.

Your program must use variables of the appropriate type.

All input and output must be done on the console.

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!