星期四, 12月 25, 2008

Quiz 12-26-2008

1. Design a non-static method that can compute the addition of fractions. You must first define Fraction class then write a demo program to verify the class program.

2. Design a static method that can compute the addition of fractions. You must first define Fraction class then write a demo program to verify the class program.

3. 列舉至少三個Java程式的風格

4. 列舉至少三個Java記憶體管理的特性

5. Write a Java program to solve the Hanoi Tower Problem.

6. Write a Java program to solve the Hanoi Tower Problem.

7. Explain ADT (Abstract Data Type).

8. Explain API (Application Programming Interface).

9. Write a Java program to calculate the sin function as follows:
sin(x)=x - x 3/3! + x5/5! - x7/7! ...

10. Write a Java program to calculate the cosine function as follows:
Cos(x)=1 - x 2 /2!+ x 4/4!- x 6/6!...

11. 一個Java 物件使用多少個Byte記憶體? 為什麼?

12. 請解釋 Garbage Collector 的作用。試舉例說明。

13. 請解釋 Overloading ,舉例說明何時可能會用到 Overloading

14. 請解釋 Constructor ,舉例說明何時可能會用到 Constructor

沒有留言: