Description: A program, the program defines an abstract class Area, the two Area class derived the subclass of RectArea Class and RoundArea of class, as well as a the implementation class ImpleArea class. The realization of the program requirements are as follows.
(1) Area class abstract class contains an abstract method: double area ().
(2) sub-class RoundArea of the coverage abstract methods in the parent class area of circular area another subclass RectArea of the abstract methods override the parent class area to find the area of a rectangle.
(3), respectively, the radius of the circle and rectangle edge is defined as the domain the the subclass of RoundArea Class and RectArea of class for type double.
(4) ImpleArea-class determined length 2.1 3.0 wide rectangular and a radius of the area of a circle of 4.0, and is displayed on the screen.
2. Statement circle Round, Area interface, calculate the area of a circle.
To Search:
File list (Check if you may need any files):
shiyan6
.......\Area.class
.......\AreaC.class
.......\AreaC.java
.......\ImpleArea.class
.......\ImpleArea.java
.......\RectArea.class
.......\Round.class
.......\Round.java
.......\RoundArea.class