Question: main.cpp #include using namespace std; int main() { // Write your main here return 0; } rectangleType.cpp rectangleType.h #include rectangleType.h rectangleType operator+(const rectangleType& r1, const

 main.cpp #include using namespace std; int main() { // Write your

main.cpp

#include

using namespace std;

int main() {

// Write your main here

return 0;

}

rectangleType.cpp

rectangleType.h

#include "rectangleType.h"

rectangleType operator+(const rectangleType& r1, const rectangleType& r2)

{

rectangleType result;

result.setLength(r1.getLength() + r2.getLength());

result.setWidth(r1.getWidth() + r2.getWidth());

return result;

}

Instructions Redo Programming Exercise 1 by overloading the operators as nonmembers of the rectangleType. The header and implementation file from Exercise 1 have been provided. Write a test program that tests various operations on the Grading When you have completed your program. click the Submit button to record your score

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!