Question: Extra credit 5 points: 4.3. Consider the animation code from the end of Chapter 4. Modify the Shape con class so that it aggregates a
Extra credit 5 points: 4.3. Consider the animation code from the end of Chapter 4. Modify the Shape con class so that it aggregates a collection of objects implementing the MovableShape interface and its painticon method takes care of painting all the given MovableShape objects. Modify the animation program (Animation Tester.main) to display 5 cars moving horizontally, each starting from a different vertical coordinate, so that the car with index i moves twice as fast as the car with index i - 1. Extra credit 5 points: 4.3. Consider the animation code from the end of Chapter 4. Modify the Shape con class so that it aggregates a collection of objects implementing the MovableShape interface and its painticon method takes care of painting all the given MovableShape objects. Modify the animation program (Animation Tester.main) to display 5 cars moving horizontally, each starting from a different vertical coordinate, so that the car with index i moves twice as fast as the car with index i - 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
