Class Poly (The Application)
public class Poly {
private Polyhedron p1, p2, p3;
public static void main(String [] argv) {
Poly thisApp = new Poly();
thisApp.p1 = new Cube(5);
thisApp.p2 = new Tetrahedron(10, 8, 7);
thisApp.p3 = new RectangularParallelopiped(2, 3, 4);
thisApp.p1.describe();
thisApp.p2.describe();
thisApp.p3.describe();
}
}
Previous slide
Next slide
Back to first slide
View graphic version