Description of the exercise
More information
Instructions on what to do in step 1
- Create a class called 'Example'
- Define a private property called 'bar' with type int
- Create a getter and a setter for this property
- Create a parameterized constructor which receives a value for 'bar'
- Create a method called 'foo'
- The method should receive an integer number as a parameter
- The method should add the value of 'bar' to this number and return it
Instructions on what to do on step 2
- Do this
- And this
- And that
Give students links for cool stuff related to the exercise.
Propose a challenge for the learners who are feeling bold.