You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
665 B
26 lines
665 B
public class TestShape
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
Circle c1 = new Circle(2.67);
|
|
System.out.println("c1: ");
|
|
System.out.println(c1.toString());
|
|
System.out.println();
|
|
|
|
Circle c2 = new Circle(3, false, "Red");
|
|
System.out.println("c2: ");
|
|
System.out.println(c2.toString());
|
|
System.out.println();
|
|
|
|
Rectangle r1 = new Rectangle(3, 2, true, "Blue");
|
|
System.out.println("r1: ");
|
|
System.out.println(r1.toString());
|
|
System.out.println();
|
|
|
|
Rectangle r2 = new Rectangle(3.2, 4, false, "Red");
|
|
System.out.println("r2: ");
|
|
System.out.println(r2.toString());
|
|
}
|
|
}
|
|
|
|
|