Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question A customer purchased some products from a retail shop. Table 1 shows the purchased details which are the product code, price per unit, quantity

image text in transcribedimage text in transcribed

Question A customer purchased some products from a retail shop. Table 1 shows the purchased details which are the product code, price per unit, quantity and discount rate. Table 1 Product Code Price Per Unit Quantity Discount 103 29.80 1 5% off 205 4.50 1 471 19.80 3 Write a C++ program that reads the customer name, product code, quantity and cash for payment. Define price per unit and discount as constant values. Calculate the total purchase and balance returned after payment is made. Use the sample outputs below to write the program. Save this file (studentID.docx) and the source code (studentID.cpp) in a folder and zip the folder as testi yourname_yourid.zip. Submit the zipped folder to MMLS. Sample Output 1 TMO Retail Point of Sales Enter cutomer name Mr/Ms : Johan Please enter the product details >>>>> Product Code: 103 Quantity: 1 Product Code: 205 Quantity: 1 Product Code: 471 Quantity: 3 Product Code: ---------- TAX INVOICE Customer Name: Johan Disc 5% Product 103 205 471 Price 29.80 4.50 19.80 Qty 1 1 3 Amount 28.31 4.50 59.40 SUBTOTAL RM92.21 CASH RM: 100 CHANGE CASH RM7.79 2 Sample Output 2 TMO Retail Point of Sales Enter cutomer name Mr/Ms : Johan Abdullah Please enter the product details >>>>> Product Code: 103 Quantity: 2 Product Code: 205 Quantity: 0 Product Code: 471 Quantity: 2 Product Code: - TAX INVOICE Customer Name: Johan Abdullah Product Disc 5% 103 205 471 Price 29.80 4.50 19.80 Qty 2 e @ Amount 56.62 0.00 @.00 SUBTOTAL RM56.62 CASH RM: 60 CHANGE CASH RM3.38 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

=+ Have they changed the way employers view IP?

Answered: 1 week ago