Abstraction Assignment Help!
Folks please go easy on me! I am a beginner so understanding all the concepts is quite hard at the moment.
For my programing class I was assigned to the following:
Suppose you want to draw various shapes on a panel and be able to
individually move them around, change their color or erase them.
You want to draw various shapes (like circles, polygons and stars).
You will need various methods (like draw, erase, move, setColor).
Think, then design your hierarchy of classes.
Where (in which class) will you put each method?
Which classes will be abstract?
Which methods will be abstract?
Write a test class to test your package.
You will need an array of shapes.
The paint() method should simply draw everything in the shapes array.
You will need some way to repaint your panel so you can demonstrate
that move and erase are working properly.
Repaint() creates a paint event.
You can use a MouseListener (or Adapter), a KeyListener (or Adapter),
an ActionListener (button) or a Timer.
A KeyListener is probably easiest since you can do different things
based on which key is pressed. At the bottom of your listener/handler,
Ive tried for several days now and I cant figure out how to go about this assignment. All the previous assignments have been fairly easy for me except for this one here.
I will appreciate any help people have to offer thanks!