Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C++ program thatwill find out the total amount of a customer\'s bill acc

ID: 3618846 • Letter: W

Question

Write a C++ program thatwill find out the total amount of a customer's bill according tothe items he or she has purchased.

Create twoclasses:

Purchased_item,

Bill

The Purchased_item shouldbe having the following data members

item_num       //for item number

note: item_num //should be static. This data member will be used to display theitem number whose information is currently required from theuser

price               //for per unit price

quantity         //for quantity purchased

class Bill should have twodata members

total_amount             //for the total amount of bill that is to be paid

items[5]                      //an array of purchased_item; should be 5 in size

class Bill should also havea member function that is used to calculate the total amount andassign it to the data member , total_amount

Your program should take input ofthe price and quantity of 5 items and display the total amountafter calculation.

OUTPUT

Your output should be similar to the following

enter price and purchased quantity of item 1

               price:20

               Quantity:5

enter price and purchased quantity of item 2

               price:10

               Quantity:2

enter price and purchased quantity of item 3

               price:15

               Quantity:1

enter price and purchased quantity of item 4

               price:30

               Quantity:2

enter price and purchased quantity of item 5

               price:10

               Quantity:2

Total amount to be paid is 215

Explanation / Answer

#include #include class purchased_item { static int item_num; int price; int quantity; public: purchaed_item() //Default constructor { price=0; quantity=0; } int get_data() { item_num++; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote