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
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