Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA QUESTION Suppose you are designing an object-oriented drawing application to draw circles, rectangles, lines, and curves. These objects all have certain states (for example:

JAVA QUESTION

Suppose you are designing an object-oriented drawing application to draw circles, rectangles, lines, and curves. These objects all have certain states (for example: position, orientation, outline color, fill color ) and behaviors (for example: moveTo, rotate, resize, draw ) in common. Some of these states and behaviors are the same for all graphic objects (for example: position, fill color, and moveTo). Others require different implementations (for example, resize and draw). All the four graphic objects must be able to draw and resize themselves; they just differ in how they do it.

(a) Describe how could you implement these objects using classes.

(b) Draw a UML that shows your proposed OOP design. Show on the UML the data fields (states), the methods (behavior) inside each class, and the relationships between the classes.

Note: No codes are required in this question.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

ISBN: ? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago