mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 19:55:17 +00:00
16 lines
477 B
Java
Executable file
16 lines
477 B
Java
Executable file
/* 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);
|
|
}
|
|
}
|