skip to main
|
skip to sidebar
homework
2009年6月16日 星期二
Lab Hanoi Tower
The pseudocode for Hanoi Tower is as follows:solve(N, Src, Aux, Dst)if N is 0 returnsolve(N-1, Src, Dst, Aux)Move N from Src to Dstsolve(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)
2009年6月7日 星期日
Homework 6-1-2009 Modular Sorting
Write a sort method which takes a double array as parameterand returns the sorted array. Call this method in a main program.Hint: The lab is a rewriting of
Lab Sorting
to make the sorting procedure a reusable method.
2009年6月2日 星期二
Lab Array
Study Display 6.1, and then write a program that can sort numbers in ascending order.
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
work
http://javaatcycu.blogspot.com
追蹤者
網誌存檔
▼
2009
(40)
▼
6月
(5)
Lab Hanoi Tower
Lab Factorial
Lab Recursive method
Homework 6-1-2009 Modular Sorting
Lab Array
►
5月
(9)
►
4月
(6)
►
3月
(18)
►
2月
(2)
關於我自己
dale
檢視我的完整簡介