Create a class: Bill_Generator The Purchased_item should be having the following data members itemPrice //for per unit price itemQty //for quantity purchased itemAmount[n] // for price of each item, n represent size of the array total_amount //for the total amount of bill that is to be paid items[n] //an array of purchased_item(item names); n represent size of the array   class should have the following member functions Constructor : will take a parameter to set size of items array. getIteminfo(): will take item information calcBill(): will calculate the bill for the items purchased. Give discount of 5% for the purchase greater than 3000 pkr. showBillInfo(): display the bill with items information, given below the output item price quantity Amount LUX 50 5 250 TUC 15 3 45

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 17PE
icon
Related questions
Question

Create a class: Bill_Generator

The Purchased_item should be having the following data members

  • itemPrice //for per unit price
  • itemQty //for quantity purchased
  • itemAmount[n] // for price of each item, n represent size of the array
  • total_amount //for the total amount of bill that is to be paid
  • items[n] //an array of purchased_item(item names); n represent size of the array

 

class should have the following member functions

Constructor : will take a parameter to set size of items array.

getIteminfo(): will take item information

calcBill(): will calculate the bill for the items purchased. Give discount of 5% for the purchase greater than 3000 pkr.

showBillInfo(): display the bill with items information, given below the output

item price quantity Amount

LUX 50 5 250

TUC 15 3 45

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning