Utopia
│
首頁
│
JAVA文章
│
網際網路系統 文章
│
電子系網站
│
2008年12月26日 星期五
Lab Hanoi Tower
The pseudocode for Hanoi Tower is as follows:
solve(N, Src, Aux, Dst)
if N is 0 return
solve(N-1, Src, Dst, Aux)
Move N from Src to Dst
solve(N-1, Aux, Src, Dst)
Write the Java program based on the pseudocode in the above.
Lab Factorial
Write a Java program that computes N! where N is a positive integer.
Hint:
public static long factorial(int n)
Lab Recursive Method
Write a recursive method to compute Fibonacci series.
Hint:
1.
fib(n)=fib(n-1)+fib(n-2)
2.
public static long fib(int n)
StaticMethod
Define a Complex class with a static method for computing complex addition. Use (2+3i)+(4+5i) in your test.
Constructor
2008年12月25日 星期四
Overloading
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
RainDog::
載入中…
這裡是超連結
igoogle
電子系網站‧改
網際網路應用設計
JAVA
殺很大的堯堯
電子戰神科科展
胖蘇
Fish的家
阿土
網誌存檔
►
2009
(47)
►
6月
(7)
►
5月
(10)
►
4月
(10)
►
3月
(15)
►
2月
(5)
▼
2008
(28)
▼
12月
(6)
Lab Hanoi Tower
Lab Factorial
Lab Recursive Method
StaticMethod
Constructor
Overloading
►
11月
(6)
►
10月
(10)
►
9月
(6)
新回應
最新回應
洩洪不足奇,住這麼久道真沒趁這階段枯水期乾涸得嚴重時從大霸泊
-2009-03-12-Cabal
中壢的天氣真的很怪異
經常又濕又冷
對有過敏
-2009-03-07-Anonymous
中壢的天氣 對於住在中南部的人來說 真的很不舒服 下與下雨下
-2009-03-06-Anonymous