C++ program An invoice contains a list of goods purchased in a store. One element of the list is a pair of goods - amount. To create an Invoice modeling class with fields: - list of purchased goods -...

I need the answer as soon as possibleC++ program<br>An invoice contains a list of goods purchased in a store. One<br>element of the list is a pair of goods - amount. To create an<br>Invoice modeling class with fields:<br>- list of purchased goods - associative array (map) with key<br>object Stock and value its price<br>In the Invoice class to implement:<br>• get () and set () methods for the list to work element by<br>element<br>• methods for adding and removing goods<br>method for searching for a product by its code<br>a method for calculating the amount paid for all purchases<br>Add and change methods accept an Stock object as an<br>argument. The search method returns a Stock object.<br>class Stock {<br>int code;<br>std::string name;<br>double valuePerUnit;<br>int numberUnits;<br>public:<br>Stock::Stock() {<br>code<br>0;<br>%3D<br>name =<br>valuePerUnit = 1;<br>numberUnits = 1;<br>}<br>Stock::Stock(int c, std::string n, double v, int nu)<br>{<br>code = c;<br>name = n;<br>valuePerUnit = v;<br>numberUnits = nu;<br>}<br>

Extracted text: C++ program An invoice contains a list of goods purchased in a store. One element of the list is a pair of goods - amount. To create an Invoice modeling class with fields: - list of purchased goods - associative array (map) with key object Stock and value its price In the Invoice class to implement: • get () and set () methods for the list to work element by element • methods for adding and removing goods method for searching for a product by its code a method for calculating the amount paid for all purchases Add and change methods accept an Stock object as an argument. The search method returns a Stock object. class Stock { int code; std::string name; double valuePerUnit; int numberUnits; public: Stock::Stock() { code 0; %3D name = valuePerUnit = 1; numberUnits = 1; } Stock::Stock(int c, std::string n, double v, int nu) { code = c; name = n; valuePerUnit = v; numberUnits = nu; }

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here