9427217 資訊二 林**
9326245 電子三 馬**
星期二, 3月 27, 2007
成績分佈: Quiz 3-26-2007
1. 你的成績已經在你的 blog 上的回應。採筆試的同學計有五位,成績如下:
9326161 10
9226332 25
9326143 20
9226362 5
9126240 25
2. 缺考2位
9426140
9126104
3. 成績分佈(應考39位)
80~89 1
70~79 0
60~69 2
50~59 2
40~49 4
30~39 5
20~29 11
10~19 8
0~9 6
9326161 10
9226332 25
9326143 20
9226362 5
9126240 25
2. 缺考2位
9426140
9126104
3. 成績分佈(應考39位)
80~89 1
70~79 0
60~69 2
50~59 2
40~49 4
30~39 5
20~29 11
10~19 8
0~9 6
星期一, 3月 26, 2007
Homework 3-26-2007: Finding the max and the min
Based on your study of Display 3.8, write a code to find the max and min of a list of number.
For example, given 1,3,5, and9, the max is 9 and the min is 1.
Your program should be able to process a list of any length.
For example, given 1,3,5, and9, the max is 9 and the min is 1.
Your program should be able to process a list of any length.
Lab: Tax Calculation
Study Display 3.1. Based on the income tax rate in Taiwan,
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.
Quiz 3-26-2007
1. Revise your program for Simple Java Expression
according to Java program styles. Check the following
(1) the naming of constants, if any,
(2) Java spelling conventions, and
(3) indenting.
2. Insert proper comments in your program for Simple Java Expression. Note that there are 2 ways to insert comments: line comments and block comments.
3. The identifier BufferedReader is normally abbreviated as BR in programming language C. However, Java programmers normally do not use abbreviations in identifiers. Can you give some good reasons for using long names in Java?
4. The Java Virtual Machine handles string objects in a way different from the one it handles variables of primitive types such as int, long, float, and double. What is the difference?
according to Java program styles. Check the following
(1) the naming of constants, if any,
(2) Java spelling conventions, and
(3) indenting.
2. Insert proper comments in your program for Simple Java Expression. Note that there are 2 ways to insert comments: line comments and block comments.
3. The identifier BufferedReader is normally abbreviated as BR in programming language C. However, Java programmers normally do not use abbreviations in identifiers. Can you give some good reasons for using long names in Java?
4. The Java Virtual Machine handles string objects in a way different from the one it handles variables of primitive types such as int, long, float, and double. What is the difference?
星期一, 3月 19, 2007
星期二, 3月 13, 2007
Lab: Scanner
Do Display 2.6 on Page 79.
You need to import the following packages in the first place.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
Change
Scanner keyboard= new Scanner(System.in);
into
BufferedReader keyboard= new BufferedReader(new InputStreamReader(System.in));
String inputString = keyboard.readLine();
You need to import the following packages in the first place.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
Change
Scanner keyboard= new Scanner(System.in);
into
BufferedReader keyboard= new BufferedReader(new InputStreamReader(System.in));
String inputString = keyboard.readLine();
Lab: Window input dialog
Use the following command to generate a window input dialog
String myString=JOptionPane.showInputDialog("Enter a number: ");
use the following command to convert a string to a number
int myNumber = Integer.parseInt(myString);
and finally use the following command to print the input number to the console
System.out.println("The number is "+ myNumber);
Don't forget the following import command
import javax.swing.JOptionPane;
so that Java can recognize JOptionPane library.
String myString=JOptionPane.showInputDialog("Enter a number: ");
use the following command to convert a string to a number
int myNumber = Integer.parseInt(myString);
and finally use the following command to print the input number to the console
System.out.println("The number is "+ myNumber);
Don't forget the following import command
import javax.swing.JOptionPane;
so that Java can recognize JOptionPane library.
星期一, 3月 12, 2007
Homework 3-12-2007
1. Do Display 1.7 of Chap. 1
2. Do Project 5 of Chap. 1
"tell me and I'll forget; show me and I may remember; involve me and I'll understand"
Memo:
2. Do Project 5 of Chap. 1
"tell me and I'll forget; show me and I may remember; involve me and I'll understand"
Memo:
- Lab 超過下課24小時未交, 不予記分.
- 未交 Lab, 不僅該 Lab 不記分, 且扣平時成績.
- Homework 超過繳交時間(下次上課前) , 不予記分
- Lab 與 Homework 的重要性參看課程大綱
3-12-2007 點名未到
點名未到
9126104
9226147
9326114
9326161
9326265
9326305
9426140
late
9326143
9326138
9426116
9426126
9426127
9126104
9226147
9326114
9326161
9326265
9326305
9426140
late
9326143
9326138
9426116
9426126
9426127
務必帶課本上課
由於上課時上機的需要, 同學務必攜帶課本, 你可以向修過這門課的學長借, 無論是第一版或第二版都可以.
使用原版之教科書
由於(台灣國際圖書業交流協會書函), 叮嚀必須使用使用原版之教科書作為上課及教學之用, 所以本課程使用原版之教科書作為上課及教學, 任何課本影印本, 一律不准攜入教室.
使用原版之教科書
由於(台灣國際圖書業交流協會書函), 叮嚀必須使用使用原版之教科書作為上課及教學之用, 所以本課程使用原版之教科書作為上課及教學, 任何課本影印本, 一律不准攜入教室.
Lab: Simple Java Expression
Do Project 4 on Page 56. (2nd Edition)
Do Project 1 on Page 54. (1st Edition)
Do Project 1 on Page 54. (1st Edition)
星期一, 3月 05, 2007
Homework 3/5/2007
"tell me and I'll forget; show me and I may remember; involve me and I'll understand"
Homework Problems due 3/12 18:50
1. Explain bytecode, JVM
2. Explain class, object
3. Reading Assignments:
Read 1.1, 1.2, 1.3 of Textbook
4.1 Write a Java program as follows:
Let i=2;
Print i;
Print 2 * (i++);
Print i;
Ans: 2, 4, 3
4.2 Write a Java program as follows:
Let i=2;
Print i;
Print 2 * (++i);
Print i;
Ans: 2, 6, 3
4.3 Write a Java program as follows:
Let m=7, n=2;
Print (double) m/n;
Print m/ (double)n;
Ans: 3.5, 3.5
Homework Problems due 3/12 18:50
1. Explain bytecode, JVM
2. Explain class, object
3. Reading Assignments:
Read 1.1, 1.2, 1.3 of Textbook
4.1 Write a Java program as follows:
Let i=2;
Print i;
Print 2 * (i++);
Print i;
Ans: 2, 4, 3
4.2 Write a Java program as follows:
Let i=2;
Print i;
Print 2 * (++i);
Print i;
Ans: 2, 6, 3
4.3 Write a Java program as follows:
Let m=7, n=2;
Print (double) m/n;
Print m/ (double)n;
Ans: 3.5, 3.5
訂閱:
文章 (Atom)