Question: public class Lab 2 pm { public static void main ( String [ ] args ) { GeoShape [ ] shapes = new GeoShape [
public class Labpm
public static void mainString args
GeoShape shapes new GeoShape;
shapes new Circlered "circle", ;
shapes new Rectangleblue "rectangle", ;
shapes new Hexagonpink"hexagon", ;
replace my name with your name
System.out.printlnProgrammer is Dr Johnson
;
NOTE: output for first shape should be:
Shape: circle
Color: red
Area:
Perimeter:
int i;
for i; i
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
