Question: Code the createGeoShapes 0 method to retum an arraylist of geometric shapes according to the following instructions: 2.) a.) Code the method header ( 15

Code the createGeoShapes 0 method to retum an arraylist of geometric shapes according to the following instructions: 2.) a.) Code the method header ( 15 points) b.) Inside method, define local variables such as length and width of a rectangle, and radius of a circle, and an arraylist contain both Rectangle and Circle objects. (15 points) c.) Inside the method define a do-while loop that will: (110 points) 1.) Ask the user whether they wish to create a Rectangle or a Circle. 2.) Ask more questions depending on whether the user selected Rectangle or Circle (Hintt length and with or radius) 3.) Construct either a Rectangle object or a Circle object. 4.) Add the object created in step 3 to the arraylist. 5.) Keep looping as long as the user answers "yes" to creating another shape. 6.) Once the loop ends, the method returns the arraylist
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
