Objective: Understand the basic concept of operator overloading and its use cases.
Task: Create a class Counter
and overload the ++
operator to increment the counter value.
Objective: Learn to overload unary operators for custom behavior.
Task: Overload the --
(decrement) operator for the Counter
class from Lab 1.
Objective: Implement deep copying using the copy assignment operator.
Task: Create a class Matrix
with dynamic memory allocation and overload the =
operator to perform a deep copy.
Objective: Implement efficient object transfers using the move semantics.
Task: Modify the Matrix
class to include an overload of the move assignment operator that transfers ownership of resources.
Objective: Overload operators as class member functions for arithmetic operations.
Task: Overload the +
and -
operators in the Matrix
class to allow for matrix addition and subtraction.
Objective: Overload operators as global functions to handle arithmetic between different types.
Task: Overload the *
operator to perform multiplication between a Matrix
object and a scalar value as a global function.
Objective: Overload the <<
operator for custom object output formatting.
Task: Overload the stream insertion operator to output the contents of a Matrix
object in a formatted manner.
Objective: Overload the >>
operator for custom object input.
Task: Overload the stream extraction operator to input values into a Matrix
object.
Objective: Overload the subscript operators to access elements in a custom container.
Task: Create a class ArrayWrapper
and overload the []
operator to access elements as if the class were an array.
Objective: Learn to overload comparison operators for user-defined types.
Task: Overload the ==
and !=
operators for the Matrix
class to compare two matrices for equality and inequality.