星期五, 6月 26, 2009
星期五, 6月 19, 2009
星期一, 6月 15, 2009
學期成績
配分比例如下
Participation (出席&小考) 50%, Lab 30%, Homework 20%
評分重點
出席: 缺席ㄧ次扣總分五分,三次以上得不及格
小考: 兩次分數加總平均(請假者個案處理)
平時分數最高30分,發問或答題者酌予加分,最高以加到20分為上限。
Lab: 完整性(是否完成所有上機),準時性,原創性,工整性(程式內容條理是否清晰,說明是否清楚),正確性
Homework: 完整性,準時性,原創性,工整性,正確性
有話要說(有話就說,無關記分)
ps: 文章意見區關閉,請直接留言在有話要說
星期日, 6月 14, 2009
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.
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)
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)
Hint:
1.
fib(n)=fib(n-1)+fib(n-2)
2.
public static long fib(int n)
訂閱:
文章 (Atom)