2. This question performs arithmeticwith numbers in hexadecimal format.
We shall employ positive numbers only (or zero).
Write a class HexDigit with the following class declaration.
class HexDigit { public: HexDigit(); int get_x() const; char get_alpha() const; void set(char c); void set(int i); private: int x; char alpha; static const char lookup[16]; };
The data is as follows.
1. The array lookup is a static (and const)data member.
2. Initialize lookup to the values’0’,…,’9’,’A’,’B’,’C’,’D’,’E’,’F’.
3. The values of x and alpha are the integer and charactervalues of the digit.
4.
PayPal Gateway not configured
PayPal Gateway not configured