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:
1- One integer member variable num that's even at all times.
2. 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
3- print() method that would print num: value of num
4- tester to test your class
 Design and implement a class Even, that has the following proprieties:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!