Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ Define class Clothing Item which is an Item that has following: private data members: 1. int clothing_size: it represents the size of the clothing
c++
Define class Clothing Item which is an Item that has following: private data members: 1. int clothing_size: it represents the size of the clothing item. Its default value is 0. 2. static int counts: initialized to 0. It counts the number of Clothing_Item objects created so far. public functions: 1. One constructor (parameterized and default): it takes a value to set all the elements of the sold_items array, its size, price, cost, and the size of the clothes. If any of these parameters is not passed, then its value is set to the default value. 2. Getter for the clothing_size data member. 3. Getter for the counts data member, make it a static function. 4. multiply_price(double factor): it updates the price to be the multiplication of the price by the factor. 5. Override the show_report function to call the show_report function of the item class and print the size of the clothing item. 6. A friend function duplicateMaxSales(Clothing_Item & item): it doubles the maximum sales value in the sold_items array. Example: if the maximum value in the sold_items array is 10, then it becomes 20. Define class Clothing Item which is an Item that has following: private data members: 1. int clothing_size: it represents the size of the clothing item. Its default value is 0. 2. static int counts: initialized to 0. It counts the number of Clothing_Item objects created so far. public functions: 1. One constructor (parameterized and default): it takes a value to set all the elements of the sold_items array, its size, price, cost, and the size of the clothes. If any of these parameters is not passed, then its value is set to the default value. 2. Getter for the clothing_size data member. 3. Getter for the counts data member, make it a static function. 4. multiply_price(double factor): it updates the price to be the multiplication of the price by the factor. 5. Override the show_report function to call the show_report function of the item class and print the size of the clothing item. 6. A friend function duplicateMaxSales(Clothing_Item & item): it doubles the maximum sales value in the sold_items array. Example: if the maximum value in the sold_items array is 10, then it becomes 20Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started