/home/caleb/ASDV-Java/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/TestGeometricObject.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.mp5_calebfontenot;
public class TestGeometricObject {
public static void main(String[] args) {
Circle circle1 = new Circle(5);
Circle circle2 = new Circle(4);
Circle circle = (Circle) GeometricObject.max(circle1, circle2);
System.out.println("The max Circle's radius is " + circle.getRadius());
System.out.println(circle);
Rectangle r1 = new Rectangle(5, 4);
Rectangle r2 = new Rectangle(4, 5);
System.out.println(r1.compareTo(r2));
System.out.println("The max rectangle is " + (Rectangle) Rectangle.max(r1, r2));
System.out.println("The max geometric object is " + GeometricObject.max(circle1, r2));
}
}