Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a cashier program to calculate the total price of a list of shopping items. You may assume that user inputs at most 1000
Write a cashier program to calculate the total price of a list of shopping items. You may assume that user inputs at most 1000 items. Each item consists of itemName (string without space), unuPrice (double) and quantity (integer). The input string "END" indicates the end of input. Then the total price is displayed using the default floating-point number format. After displaying the total price, the program allows user to query the price (or quantity) of one particular item. 5th digit of Student ID Odd Even Sample display (for odd) Apple 3.99 4 Orange 4.5 3 Beer 13.4 6 Salmon 99.9 1 END 209.76 Apple 3.99 Query... Unit Price Quantity Sample display (for even) Apple 3.99 4 Orange 4.5 3 Beer 13.4 6 Salmon 99.9 1 END 209.76 Apple 4 Act Got
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