Question: Design and implement a class Even, that has the following proprieties: 1 - One integer member variable num that's even at all times. 2 .
Design and implement a class Even, that has the following proprieties:
One integer member variable num that's even at all times.
Setter and getter for num. In the setters make sure num is even, if the input to the setter is odd, then add one to make
it even. I
print method that would print num: value of num
tester to test your class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
