Question: Please write the codes CLEARLY (C++) programming 2 A cheese factory fills it products in bex shaped containers. Write thres classes Cheese. Rectangle, and Box
A cheese factory fills it products in bex shaped containers. Write thres classes Cheese. Rectangle, and Box that represent the factory product. Define the class Checsc, with private data member npe of type string, conter CabicCentimeter of type double, and the public Define the elass Rectangle with protected data members lengat, and wially both of type double. The class also has the public member functions sen( ), prind ). findidrwi(), and the default parameforited comituctor with values 0 and 0. Define the class Bex, which publicly inherits the class Rectangle. It has the private data member heright, price of type double, A sila of type Cheese, and the member function findPrice( ). The clises has the public member functions serf(). find Volume( ). print (), and the default parameteriand constructar (etring =, double =0. doulle =0 double =0 double =0 ). lmplement all member functions asing the keast priviliged principle. Use the following driver, and print functions: int main() Box Jiben; Jiben.wete "Cheddar" +0.25,4,7,3k Jiben.print() return 0: void Cheesc:ptintd) const 1 cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
