星期一, 5月 28, 2007

Homework 5-28-2007: Sorting

Study Display 6.1, and then write a program that can sort numbers in ascending order.

Lab Static Method II

(1st ed.) Do Project 3 of Chap 5. Define a Complex class and write a program to compute (2+3i)+(4+5i) in Java.
(2nd ed.) Do Project 7 of Chap 5. Define a Complex class and write a program to compute (2+3i)+(4+5i) in Java.

Note:
Implement a static method and a nonstatic method using overloading. The results of these two methods should be the same.

星期三, 5月 23, 2007

星期一, 5月 21, 2007

Lab Static Method

Study Display 5.2.
Using static variables and static methods to implement the class Fibonacci such that
the first call to Fibonacci.next()
returns 2, the second returns 3, and then 5, and so on.

Lab Java Constructor

Use Display 4.14 to call 4.13 (2nd ed.) or
Display 4.12 to call 4.11 (1st ed.).

After you finish the above, try the following

Date birthday = new Date("Jan",1,2000);
birthday.Date("Feb",1,2000);
birthday.setDate("Feb",1,2000);
birthday=new Date("Mar",1,2000);

星期五, 5月 18, 2007

6-23-2007 老師公假出國開會一周

6-23-2007 , 6-25-2007 老師公假出國開會,停課兩次。

6-18-2007 端午節停課一次。最後一次上課為 6-11-2007。

5-28-2007 第三次上機測驗

Java 基本知識,問答題 50%, 範圍課本 Chap. 1~Chap. 5, Open book
Java 物件導向程式設計,50%, 範圍課本 Chap. 1~Chap. 5, Open book

星期二, 5月 15, 2007

Homework 5-14-2007

Define a Complex class and write an object oriented program to compute (2+3i)+(4+5i) in Java.

觀察名單

如果你第一次小考未滿25分,且第二次上機考也未通過,將列入觀察名單。

5-14-2007 上機測驗通過名單

林明駿
李習文
陳志威
張嘉軒
溫建宇
鄧名鈞
(依姓氏筆畫排列)

星期一, 5月 14, 2007

上機測驗

使用 Java 寫出一個 九九乘法表。

星期一, 5月 07, 2007

5-14-2007 隨堂上機考

範圍:課本第四章
題目:隨堂公告
方式: Open Book

Lab Counter

Define a class called Counter whose objects count things. An object of this class records a count that is a nonnegative integer. Include methods to set the counter to 0, to increase the count by 1, and to decrease the count by 1. Include an accessor method that returns the current count value and a method that outputs the count to the screen. Write a program to test


counter.reset();
counter.inc();
counter.inc();
counter.dec();
counter.output();

Homework 5-7-2007: Overloading in Java

Study Display 4.11 and use Display 4.12 to call 4.11. (2nd ed.)

Study Display 4.9 and use Display 4.10 to call 4.9 (1st ed.)