2007年12月28日 星期五

Lab: Static Method II

Define a Complex class with a static method for computing complex addition. Use (2+3i)+(4+5i) in your test.

Demo:


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.

Demo:


Homework 12/21/2007

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. You should use constructors to initialize the two vectors.

2007年12月21日 星期五

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







2007年12月14日 星期五

Homework 12-7-2007

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




2. Show comments on your blog.