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

2008年10月24日 星期五

Lab Finding the max of a list of numbers

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.

Lab Finding the max of three numbers

Write a program to decide the max number of the three input number.

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.

1,000,000


2,000,000

2008年10月23日 星期四

Homework 10-3-2008

3. Do Project 4 in Chapter 2

4. Do Project 5 in Chapter 2

5. Do Project 6, in Chapter 2

6. Do Project 7, in Chapter 2

2008年10月3日 星期五

Lab: Numerical Method

Project 1 of Chap. 2.

Lab Keyboad processing

Project 3 of Chap. 2.

Lab Keyboard Input

1.
Do Display 2.6.



2.
Rewrite Display 2.6 using BufferedReader.