Question: In this assignment you are asked to write a Python program to create a base class called Athlete and three derived classes FootballPlayer BaseballPlayer and
In this assignment you are asked to write a Python program to create a base class called Athlete and three derived classes FootballPlayer BaseballPlayer and BasketballPlayer. You are also asked to create another class called SoccerPlayer, which is not a subclass of class Athlete, to demonstrate the difference The Athlete' class should have, at minimum, the following method: Method Name Output/ Attributes Returns Input/ Purpose It iterates through the list actions' (provided as an input eter) and checks if any n is invalid i.e. not present invalid, then raises an exception, otherwise, ges self.actions to be equal actions. Note that self actions is defined and initialised differently for different derived in self actions. I self Exception on init equaltions nothing classes. aSee below @The list of valid actions for each type of player i.e FootballPlayer. Baseball Player' and 'BasketballPlayer' is as follows: FootballPlayer: actions run', pass, block', kick, tackle', punt) BaseballPlayer: actions Crun', throw. bat, 'catch. field, 'slide) BasketballPlayer: actions(run'. 'dribble. 'shoot, 'rebound, lay-up'. slamdunk The classes FootballPlayer. 'BaseballPlayer should have, at minimum, the following method and BasketballPlayer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
