2007年12月14日 星期五

Homework 12-7-2007

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

Source codes:

Complex class.

1."input method" This method can deal with negative numbers.

















2."add and minus methods"

















3."multiply and divide methods"

















main
1.

















2.

















Running program

















Homework 2. Show comments on your blog.

How to show comments on your blog

result:

沒有留言: