1. Design a non-static method that can compute the addition of complexes. You must first define Complex class then write a demo program to verify the class program.
2. Design a static method that can compute the multiplication of fractions. You must first define Fraction class then write a demo program to verify the class program.
3. 列舉至少三個Java程式風格
4. 列舉至少三個Java記憶體管理特性
5. 6. Design a method that can compute the vector inner product. You must define Vector class in the first place. Write a demo program to verify your program works.
7. Give three examples of ADT (Abstract Data Type).
8. Give three examples of API (Application Programming Interface).
9. 10. 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.
11. 為什麼static method 不能呼叫 nonstatic method?詳細說明之。
12. 請解釋 public static final PI = 3.141592654 中, public, static, final 的意義。
13. 舉三個例子說明 Overloading
14. 舉三個例子說明 Constructor
沒有留言:
張貼留言