CONTINUE METHODS
CLASSWORK
We will be working on these methods (not necessarily in this order) over the next couple of days
int randomNum(int n) // returns a random number between 0 and n
int randomNum(int start, int stop) // return a random number between start and stop
int rightMostDigit(int n) // return the rightmost digit of n
int countDigits(int n) // count the number of digits in n
int binaryToDecimal(int binary) // return the decimal value of binary
boolean isPrime(int n)
int factorial(int n)
void printXTimes(int x, String s) // prints the string s x times
void printFibonacci(int n) // prints up to and including the nth Fibonacci
void printSeparateLines(String s) // print each char of s on separate lines
void printBackwards(String s) // print each char of s on separate lines backwards
boolean equalLength(String s1, String s2) // see. p. 81, use length()
boolean sameWord(String s1, String s2) // use equals()
boolean sameFirstLetter(String s1, String s2) // get the first char and use ==
boolean sameLastLetter(String s1, String s2) // get the last char and use ==
boolean containsVowels(String s) // any letter in s is a vowel
String stripVowels(String s) // return s without vowels
boolean isEquilateral(int side1, int side2, int side3)
boolean isRightTriangle(int angle1, int angle2, int angle3)
int powerOfTwo(int n)// return 2 raised to the power of n
int max(int n1, int n2)
int min(int n1, int n2)
boolean inRange(int n, int start, int stop) // is in between start and stop inclusive
HOMEWORK
Any three methods from Warmup section of Javabat (remember to login)
Must finish before 9pm
TUE
Continue working on methods listed above (new methods may be added)
HOMEWORK
Any three more methods from Warmup section of Javabat (remember to login)
Must finish before 9pm
WED
Review for Friday's quiz and/or Processing fun!
THU
NO SCHOOL!!!!!!!! YAY!!!!!!!!!!!!!!!!!!!
FRI
OH NO! METHODS QUIZ