Write a java method testshapeiface


Problem

Write a java method testShapeIFace(int numShapes) so that it has the following functionality:

1) It should create a List<> of Shapes, using the standard Java List/ArrayList classes.

2) It should then create and add numShapes random circles and numShapes random rectangles to this List and then loop through all list elements, drawing each of them. Use Math.random() to generate random numbers for the shape dimensions.

3) It should then scale all shapes in the list by a factor of 0.5 and re-draw the shapes, using a different colour. Shapes should be scaled about their centre.

More info:

I basically have a tester class:
"import java.util.ArrayList;
import java.util.List;
import java.awt.Color;
public class Tester { " and "public static void testShapeIFace(int numShapes) "is a method within the class. You can store the dimensions as array. lastly, i have an external jar file; "stdlib-package.jar", and when its the functio is called, it'll draw shapes.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a java method testshapeiface
Reference No:- TGS03242068

Expected delivery within 24 Hours