2008年11月7日 星期五
2008年10月25日 星期六
Homework 10-24-2008
1. Write a program to generate the series 1, 1, 2, 3, 5, 8, 13, ...
The series has a property that the third number is the sum of the first and second numbers. For example, 2=1+1, 3=1+2, and 5=2+3.

2. Write a program to generate the following table of arithmetic expressions
1*1=1 1*2=2 1*3=3 ... 1*9=9
2*1=2 2*2=4 2*3=6 ... 2*9=19
...
9*1=9 9*2=18 9*3=27 ... 9*9=81
The series has a property that the third number is the sum of the first and second numbers. For example, 2=1+1, 3=1+2, and 5=2+3.
2. Write a program to generate the following table of arithmetic expressions
1*1=1 1*2=2 1*3=3 ... 1*9=9
2*1=2 2*2=4 2*3=6 ... 2*9=19
...
9*1=9 9*2=18 9*3=27 ... 9*9=81
2008年10月23日 星期四
Homework 10-3-2008
2008年9月27日 星期六
Homework 9-26-2008
1. Complete Lab String Processing.
2. Write a program that can reverse the order of an input string. For example, if you input "ab", it will output "ba".
輸入任意字串後,顛倒輸出。
2. Write a program that can reverse the order of an input string. For example, if you input "ab", it will output "ba".
輸入任意字串後,顛倒輸出。
2008年9月25日 星期四
Homework 9-19-2008
1.Explain bytecode, JVM
Ans:
JVM(Java Virtual Machine) Java虛擬機器
JAVA為了解決跨平台的問題,開發了一個假的電腦,即是Java虛擬機器。
故Java程式在轉譯時,不是轉成真正電腦的機器碼,而是Java虛擬機器的機器碼(ByteCode)。
2. Explain class, object
Ans:
class 類別
object 物件
類別與物件 是物件導向的基本概念
"類別"像是種類,例如 : 人類、魚、飛機、等等...
而"物件"屬於各種類別,例如:每個人都是個物件 是屬於"人"的類別
但是每個人的性別、長相、膚色不盡相同,且能力也不同,
就如同物件導向裡,可以有不同的屬性與方法,因此每個人都是個獨立的物件。
4.1

4.2

4.3
Ans:
JVM(Java Virtual Machine) Java虛擬機器
JAVA為了解決跨平台的問題,開發了一個假的電腦,即是Java虛擬機器。
故Java程式在轉譯時,不是轉成真正電腦的機器碼,而是Java虛擬機器的機器碼(ByteCode)。
2. Explain class, object
Ans:
class 類別
object 物件
類別與物件 是物件導向的基本概念
"類別"像是種類,例如 : 人類、魚、飛機、等等...
而"物件"屬於各種類別,例如:每個人都是個物件 是屬於"人"的類別
但是每個人的性別、長相、膚色不盡相同,且能力也不同,
就如同物件導向裡,可以有不同的屬性與方法,因此每個人都是個獨立的物件。
4.1
4.2
4.3
訂閱:
文章 (Atom)