
Programming
LabExercise 4
Dead Line: 23 March 11:00 AM.
Problem Statement:
In this assignment you have to extend the complex numbers class you studied in the lab.
Requirements:
Re implement the class, make all constructors, set and get functions.
• Overload the following operators:
o Arithmetic Operators (+, -, * /, %)
o Post/Pre Increment and Decrement Operators (++, --)
o Relational Operators (<, >, ==, !=, >=, <=)
o Assignment Operator ( = )
o Stream Insertion and Extraction Operators (<<, >>)
o And any other operators that you think are appropriate.
• All these operators should be overloaded not only for complex numbers as right
hand arguments but also for basic numeric types as right hand operators.
• Use all these operators.
• Make a function that returns how many complex numbers have been created so
far.
Submission Guidelines:
1. ZERO credit for assignments submitted after 23rd March 2008 11:00 AM..
2. Submit your assignment in groups of two. You have it submit it on your t.a’s email
address.