星期日, 4月 17, 2005

5/13 Lab

1. For Display 4.9,

1.1
in overloaded setDate()
replace monthInt with month,
replace monthString with month,

and then make necessary code changes so that the program still runs correctly.


1.2
in overloaded dateOK()
replace monthInt with month,
replace monthString with month,

replace dayInt with day,
replace yearInt with year,

and then make necessary code changes so that the program still runs correctly.

1.3
in readLinput()
replace dayInput with day,
replace monthInput with month,
replace yearInput with year,

and then make necessary code changes so that the program still runs correctly.

1.4
in setMonth()
replace monthNumber with month,

and then make necessary code changes so that the program still runs correctly.

1.5
in monthString(),
replace monthNumber with month,

and then make necessary code changes so that the program still runs correctly.


5/13 Homework

1. Continued from your 5/6 Homework, do Project 4.1 (the Counter project) including implementations of toString method
and equals method. You should include the statements in the main that test equals method.

2. Do Project 4.3 (the Temperature project)

3. Do Project 4.4

4/29 Homework

Do Project 3.4 (the Taylor project)

5/6 Homework (Counter Class)

1. Do Project 4.1 (the Counter project) without implementing toString method
or equals method. For now, you may comment out the statements in the main that test equals method.

5/6 Lab

Study Display 4.1 and then do Exercise 1.

Study Display 4.2 & Display 4.3 and then
1. comment out date.setDate(6, 17, year); by // date.setDate(6, 17, year);
2.
At the next line below, add date.readInput();
3.
Run the program again. Fix any problems you may encouter along the way.
4. At the last line of your program, add System.out.println(date.month);
and see what happens. Why?

星期六, 4月 16, 2005

4/29 Lab

Based on your study of Display 3.8, write a code to find the max and min of a list of number.

Do Project 3.3 Fibonacci numbers.
List the first 100 numbers and the ratio of
a number to its previous number.

Want to know more about Fibonacci number

4/15 Lab

1. Do Display 3.1 on JBuilder and test the results.
2. Based on your study of Display 3.1, develop your code for Exercise 8.

4/22 no class

no class 4/22 because we don't have midterms.

星期五, 4月 01, 2005

4/1 Homework

1. Do Project 2.03
2. Do Project 2.05

4/1 Lab

Try Display 2.04 and then do Project 2.01