Animate a person with waving hands. Make a subclass of the class from Exercise 9.20 where the constructor can take an argument describing the angle between the arms and the torso. Use this new class...


Animate a person with waving hands.


Make a subclass of the class from Exercise 9.20 where the constructor can take an argument describing the angle between the arms and the torso. Use this new class to animate a person who waves her/his hands. Name of program file: draw_waving_person.py.


Exercise 9.20


Make a class for drawing a person.


A very simple sketch of a human being can be made of a circle for the head, two lines for the arms, one vertical line or a rectangle for the torso, and two lines for the legs. Make a class in the Shape hierarchy from Chapter 9.4 for drawing such a simple sketch of a person. Build the figure from Line and Circle instances. Supply the following arguments to the constructor: the center point of the head and the radius R of the head. Let the arms and the torso be of length 4R, and the legs of length 6R. The angle between the legs can be fixed (say 30 degrees), while the angle of the arms relative to the torso can be an argument to the constructor with a suitable default value. Name of program file: draw_person.py.

Nov 25, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here