Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) New : Byclicking on that button, another window will be open, and yourpreviou

ID: 3618884 • Letter: 1

Question

1)      New: Byclicking on that button, another window will be open, and yourprevious work will be discarded.

2)      Save:Will open a dialog box where you choose where to save yourfile.

1)      Clear:Will erase everything on the page.

2)      Close:will close the application.

On the left hand side, you should have 5 radio buttons fordifferent shapes (Pen, Oval, Rectangle, Filled Oval, FilledRectangle), and by choosing one of them, the user will be able todraw that shape on the panel by pressing and dragging the mouse.You also need to add 6 buttons of different colors at the bottomleft of the window (Black ,red, yellow,blue, pink, green).

Explanation / Answer

Make a new file ingraph package named Shapes.java and paste this code in that file /** This is the abstract parent class for different shapeclasses, like rectangle, oval, polygon and triangle. It provides anabstract method draw(). */ package graph; import java.util.*; import java.awt.*; public abstract class Shapes { /**abstract method draw()     @return void */ public abstract void draw(java.util.List list, Graphicsg); } //different implementations of Shape class class RectangleShape extends Shapes { Point sPoint = null; Point ePoint = null; public void draw(java.util.List list, Graphics g) {     Iterator it = list.iterator();     //if the list does not contain the required twopoints, return.     if(list.size()