2008年6月27日 星期五

BMI cacluate

題目
請寫出一個程式可接受使用者輸入體重與身高 並計算出BMI值?

Body Mass Index (BMI) is a number calculated from a person weight and height. BMI provides a reliable indicator of body fatness for most people and is used to screen for weight categories that may lead to health problems.

w = 體重,單位:公斤;
h = 身高,單位:;


........BMI...........Weight Status

......Below 18.5 ......Underweight

.....18.5 – 24.9 ..........Normal
......25.0 – 29.9 .......Overweight
..30.0 and Above .......Obese






如果你對BMI有興趣,可以參考BMI

寵物登錄系統

題目:
假設現在給你一個規格,請你利用Java語言為一家獸醫店設計登錄系統,規格如下:
"寵物具有飼主、登錄日期、以及疫苗接種時間等資料。貓是一種寵物,並具有一個旗標指示是否經過閹割,以及斑紋的描述語句"
假設寵物類別已經定義好了,你希望在整個應用程式當中都能自由使用Cat(貓)這個類別,你要如何用下列之字眼來描述Cat類別?

Cat,class,Date,extends,Object,Owner,Pet,private,protected,public,String





2008年6月15日 星期日

雷電盃

躲避球

預備
我跳
徐振倫高人一等


我接!
重生區

準備
反攻囉

排球


發球



曾瑞華殺球
踩線犯規

2008年6月14日 星期六

Lab Magic Parking Tower

A parking tower is out of order someday. If you park a Benz, you will end up with a Torben. Write a program to simulate this scenario. First create a class called CarParked which has a static method called outOfOrder. Name an object called yourCar, which happens to be a Benz. Your program should contain a class called CarParked and a test program called CarParkedDemo which test the method by CarParked.outOfOrder(yourCar).



2008年6月9日 星期一

Lab Static method

Define a Complex class with a static method for computing complex addition. Use (2+3i)+(4+5i) in your test.




Lab Java Constructor

Use Display 4.14 to call 4.13 (2nd ed.) or
Display 4.12 to call 4.11 (1st ed.).

After you finish the above, try the following

Date birthday = new Date("Jan",1,2000);
birthday.Date("Feb",1,2000);
birthday.setDate("Feb",1,2000);
birthday=new Date("Mar",1,2000);






2008年6月2日 星期一

Lab Overloading

Do Display 4.11