// Solution of Assignment 1.
#include<iostream>
using namespace std;

// Specification Part of the Class
class Integer
{
private:
	int n;
public:
	Integer(int x = 0);
	bool isEven();
	void set(int x);
	int get();
};

// Driver
int main()
{
	int a;
	cout << "Enter an integer: ";
	cin >> a;
	Integer b(a);	
	if (b.isEven()) 
		cout << b.get() << " is even." << endl;
	else
		cout << b.get() << " is odd." << endl;
	cout << "Enter another integer: ";
   	cin >> a;
	b.set(a);		
	if (b.isEven())
		cout << b.get() << " is even." << endl;
	else
		cout << b.get() << " is odd." << endl;
	return 0;
}

// Implemention Part of the Class
Integer::Integer(int x)
{
    n = x;
}

bool Integer::isEven()
{
	if (n % 2 == 0)
		return true;
	else
		return false;	
}

void Integer::set(int x)
{
	n = x;
}

int Integer::get()
{
	return n;
}

