-->

2007年11月25日 星期日

Makeup Work 11/9/2007

第二次小考未通過者,你可以使用JBuilder 重做全部三個題目,學期末將參酌加分。最慢繳交日期 11/25。
尤其前兩次小考都未通過者,這個加分將加在佔總分40%的平時分數裡面。

For those who didn't pass Quiz II (see the list), you are encouraged to write complete Java programs and run them on your JBuilder. Please present your source codes and the answers that your programs produce.

Your makeup work can be posted to the following comment area, as usual.

There are 3 problem each with its own marks. Total above 75 marks is considered as PASS.

1. (50) Write a Java program to calculate the sin function as follows:
sin(x)=x - 3!/x 3 + 5!/x5 - 7!/x7 ...
 

2. (30)

Write a complete Java program that uses a for loop to compute the sum of the even numbers and the sum of the odd numbers between 1 and 25.
 

 
3. (70) Write a program to calculate average science scores by gender based on the following data, where F stands for female and M for male.

M 82
M 65
F 88
M 63
F 75
F 90
F 90
M 70

You should be able to allow users to type in a whole line such as F 80 followed by next line M 70.
 

0 COMMENT: