Implement a JavaFX app that uses the MyShape hierarchy from GUI and Graphics Case Study Exercise 10.2

Question:

Implement a JavaFX app that uses the MyShape hierarchy from GUI and Graphics Case Study Exercise 10.2 to create a fully interactive drawing application. The classes of the MyShape hierarchy require no additional changes. Your app should store the shapes in an ArrayList. The user should be able to specify drawing characteristics such as which shape to draw, the stroke color, the fill color and whether the shape should be hollow or filled. Provide mouse event handling to enable the user to position and size each shape by dragging the mouse. Also enable the user to undo the last shape drawn and to clear the entire drawing.

Exercise 10.2

State whether each of the statements that follows is true or false. If false, explain why.

a) All methods in an abstract class must be declared as abstract methods.

b) Invoking a subclass-only method through a subclass variable is not allowed.

c) If a superclass declares an abstract method, a subclass must implement that method.

d) An object of a class that implements an interface may be thought of as an object of that interface type.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: