Question: Goal: Learn to call methods on objects passing in objects. ( Python ) Assignment: Assume that the class Agenda already exists, which provides the following

Goal: Learn to call methods on objects passing in objects. (Python)
Assignment: Assume that the class Agenda already exists, which provides the following method:
add_event that takes one parameter which is an Event object, and returns True if the event was added to the agenda, False otherwise.
Assume that the class Event also already exists, which has na __init__ method that takes three parameters:
A string name, which is the name of the event;
A string date, which the starting moment of the event;
A float duration, which is the duration of the event.
Finally, assume the variable agenda refers to an Agenda object. Write some code that prompts the user for the event parameters and adds the event to the agenda.
Note: Take a look at the following sample runs. Make sure the prompts and output format of your code is the same.
Note: You can safely assume the user will provide the correct type of input.

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!