CS 1C Assignment 6 Friends Overloading solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (5 votes)

Using Assignment 5
1. Write and test a friend function that checks to see if the perimeter
of a Square object is equal to the perimeter of a Triangle object.
Test both equal and not equal scenarios. Print out each
perimeter.
2. Overload the equality operator to see if the area of two Squares
are equal. Test both equal and not equal scenarios. Print out
each perimeter.
3. Write an addition member function that adds an integer to a
Square’s side (make sure the integer is a passed parameter). The
output should state how many units were added to the side. Print
out the length of the side before and after adding units to the side.
4. Overload the addition operator to add a constant to a Square’s
side. For example: MySquare = MySquare + 8. The output should
state how many units were added to the side. Print out the length
of the side before and after adding units to the side.
5. Overload << and >> operators to read in a Triangle object
(e.g. cin >> YourTriangle and cout << YourTriangle)
Due March 9th