Question: Write a Java class Purchase Demo that contains a main method that respects the following output: Sample Screen Output Enter name of item you
Write a Java class Purchase Demo that contains a main method that respects the following output: Sample Screen Output Enter name of item you are purchasing: pink grapefruit Enter price of item as two numbers. For example, 3 for $2.99 is entered as 3 2.99 Enter price of item as two numbers, now: 4 5.00 Enter number of items purchased: 0 Number must be positive. Try again. Enter number of items purchased: 3 3 pink grapefruit at 4 for $5.0 Cost each $1.25 Total cost $3.75
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Heres a Java class named PurchaseDemo that meets the ou... View full answer
Get step-by-step solutions from verified subject matter experts
