Being a programmer is not just about writing your own code. It also implies that you must be able to understand code written by others.
- Download the code of SecondClass http://www.cs.bath.ac.uk/~mdv/courses/Pre-Programming/SecondClass.java.
- Unfortunately you just received badly documented code. Nevertheless
you have to find out what the code does. In this case, the only option
is to use trial and error. Add a suitable main method to test the methods: create an object of type SecondClass and
invoke a few methods. Run the code a couple of time to find out what
it is doing.
- Document the code so that everybody is able to understand the code.
- Adapt the code of secondMethod in such a way that the sequence is printed
out in reverse order.
- Write a method that generates the third power a given number.
- Write a method that generates a sequence of all third powers of odd