Announcements and Reminders
|
|||
RecordingFunction and Operator OverloadingOperator OverloadingExamples Fraction class with overloaded
+
and
! operators
A friendly overloaded + The Overloaded fraction class Summary Overloading the insertion operatorExamplesOverloading
the insertion operator for the card class
Overloading the insertion and extraction operators for the fraction class Printing a deck Videos Tutorial |
|||
Lab Exercise #9Put your name, the compiler used, and Lab Exercise #9 in a comment at the top of your program. Email your source code. This lab exercise is due at the beginning of the next lecture. Complete the Rectangle class.
Overload the +=, !, and << operators. The += operator should add the int argument to both the length and width members. The ! operator should return the area of the Rectangle. The << operator should be written as a friend of the Rectangle class. Use this main() as a test.
It should produce the output:
|