Description: Defines four classes, MyShape, MyLine, MyRectangle and MyOval, which MyShape the other three parent class. MyShape is an abstract class, including graphics position four coordinates a no-argument constructor, all the coordinates are set to 0 a parameterized constructor, all the coordinates is set to the corresponding values each coordinate set and reading method abstract void draw (Graphics g) method. MyLine class is responsible for drawing straight lines, to achieve the draw method of the parent class MyRectangle responsible for drawing rectangles, to achieve the parent class draw method MyOval responsible painted oval, draw method to achieve the parent class. Write an application that uses the class defined above, randomly selected location and shape, draw 20 graphics.
To Search:
File list (Check if you may need any files):
Mypicture
.........\.classpath
.........\.project
.........\.settings
.........\.........\org.eclipse.jdt.core.prefs
.........\bin
.........\...\DrawComponent.class
.........\...\MyJframe.class
.........\...\MyLine.class
.........\...\MyOval.class
.........\...\MyRectangle.class
.........\...\MyShape.class
.........\...\Mypicture$1.class
.........\...\Mypicture.class
.........\src
.........\...\DrawComponent.class
.........\...\MyJframe.class
.........\...\MyLine.class
.........\...\MyOval.class
.........\...\MyRectangle.class
.........\...\MyShape.class
.........\...\Mypicture$1.class
.........\...\Mypicture.class
.........\...\Mypicture.java