Next page | Contents page |

Exercise 3 - Squarer7

In a new directory, ex3, make a modified version of our previous Squarer, called Squarer7, which behaves as follows. If the number passed in is divisible by 7 put out a message, "I cannot square anything divisible by 7!", otherwise square the number and display the result as before.

Don't forget that if we change the class name, the file name must change too.

Next page | Contents page |