#include <iostream.h>class Integers
{private:};
int num;public:
Integers(int n = 0);
void UpdateValue();
void Print() const;
Integers operator+ (const Integers & W) const;
int IsEven() const;
friend Integers operator* (const Integers & X, const Integers & Y);//Click here to see notation
void main()
{Integers A_Obj, B_Obj, sum_Obj, product_Obj;}A_Obj.UpdateValue();
B_Obj.UpdateValue();sum_Obj = A_Obj + B_Obj; //Add two objects
A_Obj.Print();
B_Obj.Print();
sum_Obj.Print();
if (sum_Obj.IsEven())
cout << "The value of sum object is even" <<endl;
else
cout << "The value of sum object is odd" <<endl;
product_Obj = A_Obj * B_Obj; //Multiply two objects
product_Obj.Print();
Integers::Integers(int n)
{
num = n;
}void Integers::UpdateValue()
{
int v;
cout << "The value of num is currently " << num << endl;
cout << "What value do you want to increase?" << endl;
cin >> v;
num = num + v;
}void Integers::Print() const
{
cout << "The value of num is " << num << endl;
}Integers Integers::operator+ (const Integers & W) const
{
return Integers(num + W.num);
}
int Integers::IsEven() const
{
return (num % 2) == 0;
}Integers operator* (const Integers & X, const Integers & Y)
{
return Integers(X.num * Y.num);
}