/home/caleb/ASDV-Java/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/TestGeometricObject.java
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.calebfontenot.mp5_calebfontenot;

/**
 *
 * @author caleb
 */
public class TestGeometricObject {
public static void main(String[] args) {
    // Create two comparable Circles
    Circle circle1 = new Circle(5);
    Circle circle2 = new Circle(4);

    // Display the max Circle
    Circle circle = (Circle) GeometricObject.max(circle1, circle2);
    System.out.println("The max Circle's radius is " + circle.getRadius());
    System.out.println(circle);

    // Create two comparable rectangles
    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));
  }
}