星期一, 2月 27, 2006

2-27-2006 加分紀錄

9224205 工業三乙 江昇祐 上課回答問題, 平常分數加 5 分

Homework 03/06/2006 Lab JOptionPane (Chapter 2)

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.

Lab Get Familiar with Java String

Display 1.7 of Chap. 1

Project 5 of Chap. 1

"tell me and I'll forget; show me and I may remember; involve me and I'll understand"

Homework 02/27/2006

Reading Assignments
1. Chapter 1

Homework
1. Project 1 on Page 55.

"nothing builds self-esteem and self-confidence like accomplishment"

星期一, 2月 20, 2006

Lab 2 Simple Java Expressions

Do Project 4 on Page 56.

2-20-2006 Homework

Homework Problems
1. Explain bytecode, JVM
2. Explain class, object
3. Let i=2;
Print i;
Print 2 * (i++);
Print i;

Ans: 2, 4, 3

4. Let i=2;
Print i;
Print 2 * (++i);
Print i;

Ans: 2, 6, 3

5. Let m=7, n=2;
Print (double) m/n;
Print m/ (double)n;

Ans: 3.5, 3.5

Reading Assignments
Read 1.1, 1.2, 1.3

Lab 1 Get familiar with JBuilder

Do Display 1.1