APCSA/U2/L5/U2_L5_Activity_Three.java
End Nightshade f76c3022bb
U2 lesson 5
2026-02-05 10:27:54 -07:00

16 lines
477 B
Java

/* Lesson 5 Coding Activity Question 3 */
import java.util.Scanner;
import shapes.*;
public class U2_L5_Activity_Three {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Type a side length:");
double length = scan.nextDouble();
RegularPolygon eq = new RegularPolygon(length);
RegularPolygon sq = new RegularPolygon(4, length);
System.out.println(eq + "\n" + sq);
}
}