Add the following two lines of code to your .bashrc file:
This will ensure that you're using the correct version of Java for this course.JAVABIN="/opt/java2/SunJava2-1.4.2_03/bin" export PATH="$JAVABIN:$HOME/local/bin:$HOME/bin:$PATH:."
Add the following text to your .emacs file:
(set-background-color "white")
Make five directories inside your home directory: lab1, lab2, lab3, lab4 and lab5.
In this lab you will write functions very much like the Java fragments you've seen in class.
A necessary technicality of this exercise is that you must include the word static before your function headers. Whereas the Java fragments presented in class looked like
boolean isZero(int n) {
return (n==0);
}
today you will write them as
static boolean isZero(int n) {
return (n==0);
}
We will create a framework for today's exercise as a group. Within that framework, develop the following functions:
You will test each function as you write it, per the instructions given in lab.
When you're finished, submit the whole lab1 folder by typing
at the command prompt.hwsubmit cs102 lab1