Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Page 5 of 6 7. Assume you are implementing the Composite pattern in a program other shapes such that if you drag a shape all

image text in transcribed
Page 5 of 6 7. Assume you are implementing the Composite pattern in a program other shapes such that if you drag a shape all of its inner shapes are m component interface defines a move method as: public void move (int deltax, int deltaY); and the leafnode class overrides it as: that allows oved with it. Furt shapes to be placed into her assume that the public void move (int deltaX, int deltaY) point point.getX()+deltax; point- point.getY()+deltaY; Write the java code needed to override the move method in the composite class. (4 points) xplain any non-obvious assumptions you make about method names, data structures, class names etc. Write code here

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

Explain briefly how biological neural network works.

Answered: 1 week ago

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago