Create a simply integer class called EasyInt that will keep track
of one integer:
- when constructed have its value automatically set to 0 if no
parameter is given
- when constructed have its value set to the parameter
- have a method called setValue
- have a method called getValue
- have a method called isEven which will return true or false
- have a method called toString
Now try the code
as another class. Look through it and then run it.
Lets play with references. Try
this worksheet out.
What did you learn?
Now lets try with this code: