這學期很高興能修到老師這們JAVA,也是我這學期最認真上的一門課吧。
一直以來我對寫程式都有很高的興趣,寫過 C C++ C# 如今又多會了個JAVA。
之前寫C++和C#時,雖然知道兩者都是屬於物件導向式語言,但其實對於物件導向的概念還是很模糊,直到這學期老師上JAVA詳細解釋其之間的關係時,我才能更加體會,這讓我在在閱讀有關程式相關書籍或使用MSDN資料庫時能更加了解,對我這學期的專題有很大的助益。
其實這學期是我第一次上有關物件導向的課程,所以在上課之前就有去圖書館借相關書籍來研讀,所以整學期的課程,我都還算應付的來,課堂上的作業我也一定都在課堂上完成,一次都沒有缺交,雖然考試可能偶有疏失,但整學期下來,我真的學的很充實,唯一讓我覺得比較困難的大概只有倒數第而堂課的遞迴吧!!畢竟他的想法比較不直觀,可能需多寫後,才會上手。
也許有多人會覺得,寫程式很不好上手,很難想。
其實我覺得只要多加練習,就可以克服,而且如果你能把自己寫好的程式,一行一行有條有序,有邏輯的解釋給別人聽,讓別人聽的懂你的想法與邏輯時,你自己就能更加了解自己所寫的程式,這樣寫下來更能融會貫通。
這是我這學期所學下來的小小心得,與大家分享!!謝謝。
2008年12月22日 星期一
Lab Hanoi Tower
Lab Factorial
Lab Recursive Method
2008年12月12日 星期五
Lab Static Method
2008年11月28日 星期五
Lab Java Constructor
2008年11月21日 星期五
lab Fraction equality test
Write a program to implement a method that can check whether 2 fractions are equal. You will implement a class called Fraction consisting of a numerator and a denominator. The equality test of 2 fractions should return a boolean value.
Use the following as the tests.
* 1/2, 2/4
* 5/6, 6/7
Hints:
Fraction f1, f2;
f1.equals(f2);

Use the following as the tests.
* 1/2, 2/4
* 5/6, 6/7
Hints:
Fraction f1, f2;
f1.equals(f2);
lab Fraction Addition
Class Definition 3
2008年11月7日 星期五
lab class definition 2
Study Display 4.4 (2nd ed. and 3rd ed.) or Display 4.2 & Display 4.3 (1st ed.) 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?

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?
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();

counter.reset();
counter.inc();
counter.inc();
counter.dec();
counter.output();
2008年10月25日 星期六
Homework 10-24-2008
1. Write a program to generate the series 1, 1, 2, 3, 5, 8, 13, ...
The series has a property that the third number is the sum of the first and second numbers. For example, 2=1+1, 3=1+2, and 5=2+3.

2. Write a program to generate the following table of arithmetic expressions
1*1=1 1*2=2 1*3=3 ... 1*9=9
2*1=2 2*2=4 2*3=6 ... 2*9=19
...
9*1=9 9*2=18 9*3=27 ... 9*9=81
The series has a property that the third number is the sum of the first and second numbers. For example, 2=1+1, 3=1+2, and 5=2+3.
2. Write a program to generate the following table of arithmetic expressions
1*1=1 1*2=2 1*3=3 ... 1*9=9
2*1=2 2*2=4 2*3=6 ... 2*9=19
...
9*1=9 9*2=18 9*3=27 ... 9*9=81
2008年10月24日 星期五
Lab Finding the max of a list of numbers
Lab: Tax Calculation
2008年10月23日 星期四
Homework 10-3-2008
2008年10月3日 星期五
訂閱:
文章 (Atom)