Overload Operators Based on the Circle class definition below: Write a member fu
ID: 3536049 • Letter: O
Question
Overload Operators
Based on the Circle class definition below: Write a member function prototype which overloads the += operator, has one double parameter and docs not return any value. Implement the overloaded +~ operator member function. The function should set the value of the radius of a Circle object to the sum of the radius and the double value passed. Write the code that creates a Circle object named my Circle. Write the code which uses the overloaded += operator function. passing a value of 10 to be added to the Circle object you created above.Explanation / Answer
a)
member function
void operator+=(double a);
b)
void circle::operator+=(double a)
{
r+=a;
}
c)
void main()
{
circle mycircle(34);
.....
.....
.....
}
d)
mycircle.operator+=(10);
plz rate me 5 and provide me points.....
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.