Question: Using C++ conduct the following (The EvenNumber class) Define the EvenNumber class for representing an even number. The class contains: 1 A data field value
Using C++ conduct the following

(The EvenNumber class) Define the EvenNumber class for representing an even number. The class contains: 1 A data field value of the int type that represents the integer value stored in the object. A no-arg constructor that creates an EvenNumber object for the value 0. A constructor that constructs an EvenNumber object with the specified value. 1 A function named getValue() to return an int value for this object. A function named getNext() to return an EvenNumber object that represents the next even number after the current even number in this object. A function named getPrevious() to return an EvenNumber object that rep- resents the previous even number before the current even number in this object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
