Java 7 教學手冊 第五版 作者:洪維恩著 旗標 書號:F2733

Chapter 8 認識類別

app8_1.java (CRectangle)

app8_2.java (CRectangle+ new CRectangle)

app8_3.java (CRectangle+ new CRectangle+ method area(), perimeter())

app8_4.java (CCircle + pi +show_area())

app8_5.java (CCircle + modified pi + show_area())

app8_6.java (CCircle + show_area() + show_all())

app8_7.java (CCircle + show_area() +setRadius(double r)

app8_8.java (CCircle + show_area() +setRadius(double p, double r)

app8_9.java (CCircle + show_area() +setRadius(double p, double r)+getRadius())

多載 (Overloading)

app8_10.java (setColor(), setRadius(), SetAll())

app8_11.java. (setCircle(String str), setCircle(double r), setCircle(String str, double r))

app8_13.java. (private double pi)

app8_14.java (public double pi)

思考題:

,