Question: Python Question: How to make this class work ? Athlete data for one athlete competing at the games. Country data for one country and its

Python Question: How to make this class work ?

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 Athlete(object) : """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. """ pass

def get_result(self, event) : """Return the result the athlete obtained in 'event'.

Parameters: event (Event): 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 (list[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

def get_id(self) : """(str) Athlete's identification number.""" pass def get_full_name(self) : """(str) Athlete's full name (first + surname).""" pass

def get_country(self) : """(Country) Country delegation to which this Athlete belongs.""" pass

def __str__(self) : return ""

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!