In cpp Write a receipt class. Class to contain as data members • The name of the store • Array of prices of purchased goods, and member functions: • Constructors • get () and set () - for prices to...

In cpp
Write a receipt class.
Class to contain as data members
• The name of the store
• Array of prices of purchased goods, and member functions:


• Constructors


• get () and set () - for prices to work with individual elements of the array


• show () - displays a list of prices, the goods to be named product # 1, product # 2, etc.


• total () - determines the total price of the goods


• remove () - removes a product from the list (according to its index)


• discount () - reduces the price of goods by a certain percentage (the index of the goods in the array and the percentage are submitted as parameters)


• other member functions if desired


In the main function, illustrate how to work with the methods of the receipt class.
Nov 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here