Sarah M.

asked • 08/07/15

How does a Ball object draw itself onto a panel in a different class?

A) The Ball object's image gets drawn in the containing class, not in the Ball class.

B) By passing its information to the other class so that class can draw it on the panel there.

C) By drawing on its own Graphics2D object, and since the Ball object is included in the other class, its image transfers to the other class.

D) By receiving the panel's Graphics2D object as a parameter and drawing the ball's image onto that Graphics2D object.

1 Expert Answer


Larry C. answered • 08/13/15

4.9 (294)

Computer Science and Mathematics professional

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.