Question: Please only use C++ to write the program. READ THE INSTRUCTIONS VERY CAREFULLY!!! The required rectangleType and boxType files from the instructions will be included

Please only use C++ to write the program. READ THE INSTRUCTIONS VERY CAREFULLY!!! The required rectangleType and boxType files from the instructions will be included below.

Please only use C++ to write the program. READ THE INSTRUCTIONS VERY

rectangleType.h file

CAREFULLY!!! The required rectangleType and boxType files from the instructions will be

rectangleType Implementation file

included below. rectangleType.h file rectangleType Implementation file boxType.h file boxType Implementation file

Use the four class files attached to create a project in Visual

boxType.h file

Studio rectangleType header file (.h) rectangleType implementation file (.cpp) boxType header file

boxType Implementation file

(.h) boxType implementation file (.cpp) Add the following to the boxtype class

Use the four class files attached to create a project in Visual Studio rectangleType header file (.h) rectangleType implementation file (.cpp) boxType header file (.h) boxType implementation file (.cpp) Add the following to the boxtype class file Write the implementation for the setDimension() function in the boxType.cpp file that will set the value for the length, width and height data members Write the implementation for the print() function in the boxType.cpp file that will print the 3 data members with a description Create a main program to use these classes Create 2 rectangleType objects using the default constructors as well as the constructor providing a length and width Create 2 boxType objects using the default constructors as well as the constructor providing a length, width and height Calculate and print the area of the rectangletype objects Calculate and print the volume of the boxtype objects #ifndef H_rectangleType #define H_rectangle Type class rectangle Type { public: void setDimension (double l, double w); double getLength() const; double getWidth() const; double area() const; double perimeter() const; void print() const; rectangleType operator+(const rectangleType&) const; I/Over load the operator + //overload the operator * bool operator==(const rectangle Type&) const; I/Overload the operator == I/Overload the operator != rectangleType(); rectangleType(double i, double w); private: double length; double width; }; #endif #include #include "rectangleType.h" using namespace std; void rectangleType::setDimension(double 1, double w) { if (1 >= 0) length = 1; else length = 0; if (w >= 0) width = w; else width = 0; } double rectangle Type::getLength() const { return length; } double rectangleType::getwidth() const { return width; } double rectangleType: :area() const { return length * width; } double rectangleType: :perimeter() const { return 2 * (length + width); } void rectangleType::print() const { cout #include "rectangleType.h" #include "boxType.h" using namespace std; double boxType::getHeight() const { return height; } double boxType:: area() const return 2 (getLength getWidth + getLength() * height + getWidth * height); } double boxType: : volume const { return rectangleType: :area() } height; boxType:: boxType() { height 0.0; } = boxType:: boxType( double double w, double h) : rectangleType(L, W) { if (h >= 0) height = h; else height = 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!