


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



6. Write and test the following static method that determines whether the given integer is a square number: static boolean isSquare(int n) ( Note: The first ten square numbers are 1,4,9,16,25,36,49,64,81 and 100. ) 7. Write and test the following static method that computes the cube of a given integer: static long cube( int n)
17. Write and test the following static method using recursion that would print the series of ODD numbers between the given ranges (start and end). NOTE: Don’t use any loop syntax. static void printOdd( int start,int end ) 18. For some reason, the computer you're working on doesn't allow you to use the modulo operator % to compute the remainder of a division. Write and test the following static method using recursion that would return the remainder. For example the following call remainder (14, 3) would return 2 (14%3=2). static void remainder( int numerator ,int denominator )
-------------------------------------------