//package chapter8; /** * Title: Chapter 8, "Class Inheritance and Interfaces" * Description: Examples for Chapter 8 * Copyright: Copyright (c) 2000 * Company: Armstrong Atlantic State University * @author Y. Daniel Liang * @version 1.0 */ // TestCylinder.java: Use inheritance //import chapter8.example8_1.Cylinder; public class TestCylinder { public static void main(String[] args) { // Create a Cylinder object and display its properties Cylinder myCylinder = new Cylinder(5.0, 2.0); System.out.println("The length is " + myCylinder.getLength()); System.out.println("The radius is " + myCylinder.getRadius()); System.out.println("The volume of the cylinder is " + myCylinder.findVolume()); System.out.println("The area of the circle is " + myCylinder.findArea()); } }