Question: in C++ Define class Sales that has the following: - private members: 1. int * sold_items: points to an array of integers. Each element in


3 ) Google Define class Item which has the following private data members 1. double price represents the price of the default vabas protected data members 1 Sales item sales an object of class Sales that represents the sofantem publike data members 1. cont double cow. It represents the cost of the item. Its default value le 1. Public function 1. One constructor parameters and death it takes a value to set all the of the sold them to reprend cost any of these parametersthen to the default value 2. Getter and setter for the price 3. Getter for the item sales object. 4. vold show reportat prints the item price cost and the number of days on which it was sold Define class Clothing. Item which an item that has following private data member: 1. Intothing, stelt represents the size of the clothing item Its default valveho 2. static int countsitate too. It count the number of Clothingiem objects created so far. pubic function 1. One constructor parametered and default value to the center of the social and the of the clothes any of these were passed the value is set to the default value 2. Getter for the clothing she datama 3. Cetter for the count data mea bermaketastatinction 4 tipy.price double factor it updates the price to be the main of the price by the 5. Override the show.report function to the show reportion of the candle theme 6 Allreduction du calea Clothing Hemdeles value Hay Elefthew theme Becomes 20 In the driver program define the following 1 non-member function of the following form to do the following vold operations Clothing Item Int site IntInt sales value If the value in the sold items array in the Index (l) is smaller than the sales the replace the Terry that Index with the value that webct in the array The following example shows the sold items arrays of each Clothing item objecte celements sold Jtems co) (3,4,4,5) (3) ----> 14,3,3,7) (2) - 17.3, 0,3) If the Index 00 is 2 and the sales value 16. Then the oldes array of each Clothing lembencara hollow celements sold items O- 13,4,6,51 1-> 14,3,6,77 2 17,3,0,31 2. Write the real function to do the following .. Define an array of 4 Clothintam objects 1. Ask the user to enter sales for 7 days. These these sales in the old teray for the last object in the letter way Double the price of the second object in the Clothinglem array 4 Call duplicate MaxSales function for the last object in the Chain Mamatay . Use the operation function to the first element of the army to the face L Print the number of Clothing Item objects created so far Print the Information of all objects of the Clothing ayusing how perfection - Define class Sales that has the following private members: 1. Int sold_items: points to an array of Integers. Each element in the array represents the number sold items in a day. The default value of any element in the array is 3. 2. Int sales_size: It is the size of the sold Items array. It represents the number of days on which the Item was sold. Its default value is 7. public functions: 1. One Constructor (parametertzed and default) that takes a value to set all the elements of the array, and the stre of the array. If any of these parameters is not passed, then default value 2. Getter for the sales stre, don't write a setter for it. 3. Getter for the sold Items array at a glven day. It recelves an Index and returns the stored value in that index in the sold items array, Assume the Index is in the proper range 4. vold set sales(int value, Int Index): It sets the recelved value in the recelved Index in the sold Items array. Assume the Index is in the proper range. 5. Int set sales/Int arr[1. Int sales_size): It coples the values in arr to the sold_Items array and then returns 1. This function works only if the passed array stre equals the sollten Otherwise, It returns-111. 3 ) Google Define class Item which has the following private data members 1. double price represents the price of the default vabas protected data members 1 Sales item sales an object of class Sales that represents the sofantem publike data members 1. cont double cow. It represents the cost of the item. Its default value le 1. Public function 1. One constructor parameters and death it takes a value to set all the of the sold them to reprend cost any of these parametersthen to the default value 2. Getter and setter for the price 3. Getter for the item sales object. 4. vold show reportat prints the item price cost and the number of days on which it was sold Define class Clothing. Item which an item that has following private data member: 1. Intothing, stelt represents the size of the clothing item Its default valveho 2. static int countsitate too. It count the number of Clothingiem objects created so far. pubic function 1. One constructor parametered and default value to the center of the social and the of the clothes any of these were passed the value is set to the default value 2. Getter for the clothing she datama 3. Cetter for the count data mea bermaketastatinction 4 tipy.price double factor it updates the price to be the main of the price by the 5. Override the show.report function to the show reportion of the candle theme 6 Allreduction du calea Clothing Hemdeles value Hay Elefthew theme Becomes 20 In the driver program define the following 1 non-member function of the following form to do the following vold operations Clothing Item Int site IntInt sales value If the value in the sold items array in the Index (l) is smaller than the sales the replace the Terry that Index with the value that webct in the array The following example shows the sold items arrays of each Clothing item objecte celements sold Jtems co) (3,4,4,5) (3) ----> 14,3,3,7) (2) - 17.3, 0,3) If the Index 00 is 2 and the sales value 16. Then the oldes array of each Clothing lembencara hollow celements sold items O- 13,4,6,51 1-> 14,3,6,77 2 17,3,0,31 2. Write the real function to do the following .. Define an array of 4 Clothintam objects 1. Ask the user to enter sales for 7 days. These these sales in the old teray for the last object in the letter way Double the price of the second object in the Clothinglem array 4 Call duplicate MaxSales function for the last object in the Chain Mamatay . Use the operation function to the first element of the army to the face L Print the number of Clothing Item objects created so far Print the Information of all objects of the Clothing ayusing how perfection - Define class Sales that has the following private members: 1. Int sold_items: points to an array of Integers. Each element in the array represents the number sold items in a day. The default value of any element in the array is 3. 2. Int sales_size: It is the size of the sold Items array. It represents the number of days on which the Item was sold. Its default value is 7. public functions: 1. One Constructor (parametertzed and default) that takes a value to set all the elements of the array, and the stre of the array. If any of these parameters is not passed, then default value 2. Getter for the sales stre, don't write a setter for it. 3. Getter for the sold Items array at a glven day. It recelves an Index and returns the stored value in that index in the sold items array, Assume the Index is in the proper range 4. vold set sales(int value, Int Index): It sets the recelved value in the recelved Index in the sold Items array. Assume the Index is in the proper range. 5. Int set sales/Int arr[1. Int sales_size): It coples the values in arr to the sold_Items array and then returns 1. This function works only if the passed array stre equals the sollten Otherwise, It returns-111
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
