// This program demonstrates overloading of the assignment operator. #include #include #include "overload.h" using namespace std; int main() { NumberArray first(3, 10.5); NumberArray second(5, 20.5); // Display the values of the two objects. cout << setprecision(2) << fixed << showpoint; cout << "First object's data is "; first.print(); cout << endl << "Second object's data is "; second.print(); cout << endl; // Call the overloaded operator. cout << endl << "Now we will assign the second object " << "to the first." << endl << endl; first = second; //invokes overloaded = operator // Display the new values of the two objects. cout << "First object's data is "; first.print(); cout << endl << "The second object's data is "; second.print(); cout << endl; return 0; }