Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access with AI-Powered 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