Question: Python Question : How to make this class work ? You can just answer the first part, thanks a lot ! Athlete data for one
Python Question : How to make this class work ?
You can just answer the first part, thanks a lot !
Athlete data for one athlete competing at the games.
Country data for one country and its delegation at the games.
Event data for one event at the games.
Result data that is one athletes result in one event.





class AthleteCobject) """Details of an athlete who is competing at the games."" def init_(self, identifier, first_name, surname, country) Parameters: identifier (str): Athlete's identification number first_name (str): Athlete's first name surname (str): Athlete's surname country (Country): Object representing this athlete's country self._identifier - identifier self.-first name first_name self._surname surname self._country country def get.result(self, event) " ""Return the result the athlete obtained in 'event Parameters: event CEvent): Event for which the athlete's result is wanted Return: Result: Athlete's result in 'event" pass def add_result(self, event, result): "Sets athlete's "result'in'event', overwriting if previously set Parameters: event (Event): Event in which this athlete competed result (Result): Final result obtained in event pass def add event (self, event) """Adds event to those in which this athlete will compete Parameters: event (Event): Event in which this athlete will compete pass def add_events(self, events): ""Adds all events to those in which this athlete will compete Parameters: events Clist[Event]): List of events in which this athlete will compete pass def get_events(self) ""(list[Event]) All events in which this athlete is competing.""" pass class AthleteCobject) """Details of an athlete who is competing at the games."" def init_(self, identifier, first_name, surname, country) Parameters: identifier (str): Athlete's identification number first_name (str): Athlete's first name surname (str): Athlete's surname country (Country): Object representing this athlete's country self._identifier - identifier self.-first name first_name self._surname surname self._country country def get.result(self, event) " ""Return the result the athlete obtained in 'event Parameters: event CEvent): Event for which the athlete's result is wanted Return: Result: Athlete's result in 'event" pass def add_result(self, event, result): "Sets athlete's "result'in'event', overwriting if previously set Parameters: event (Event): Event in which this athlete competed result (Result): Final result obtained in event pass def add event (self, event) """Adds event to those in which this athlete will compete Parameters: event (Event): Event in which this athlete will compete pass def add_events(self, events): ""Adds all events to those in which this athlete will compete Parameters: events Clist[Event]): List of events in which this athlete will compete pass def get_events(self) ""(list[Event]) All events in which this athlete is competing.""" pass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
