Question
4. TABLE Q4 shows the stationery items that need to be ordered as new stock for XYZ Enterprise. a. No Item i. 1 2
4. TABLE Q4 shows the stationery items that need to be ordered as new stock for XYZ Enterprise. a. No Item i. 1 2 3 4 5 ii. 6 7 8 9 TABLE Q4: Stationery Items Quantity Color paper A4 paper File Exercise book Pencil Pen Eraser Sharpener Ruler 10 Log book 1500 1500 1000 1000 600 600 600 600 600 100 Write a type declaration for structure named Stationery that will take item, quantity and pricePerQuantity as the fields. Then, declare a variable name MyOrder as a single dimensional array that stores the records of 10 ordered stationery items as shown in TABLE Q4. Price per quantity (RM) 15.00 10.00 3.00 3.50 1.50 2.50 0.20 0.60 0.80 6.00 b. Based on the declaration in part(a), perform the following: [3 marks] Write a C++ code fragment to prompt the data for 10 stationery items as shown in TABLE Q4. [4 marks] Write a C++ code fragment that will calculate and display the price for each item and total amount the customer needs to pay. [5 marks]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started