Question: Part C: [20 pts] Write a class named LibraryEmployee. Each LibraryEmployee has the following attributes: name: the name of the employee. favorites: a set of

Part C: [20 pts] Write a class named LibraryEmployee. Each LibraryEmployee has the following attributes:

name: the name of the employee.

favorites: a set of this employees favorite Books (or ComicBooks).

num_coffees: an integer representing how many coffees this employee has had today. This value should begin at zero when a LibraryEmployee is initialized. The LibraryEmployee class should have an initializer that accepts the employees name and favorites as arguments. These values should be assigned to the objects respective attributes. Additionally, the LibraryEmployee class should have the following methods:

- drink_coffee(): takes in an integer num, and increases this LibraryEmployees num_coffees attribute by that integer.

- __str__() : return the LibraryEmployees name.

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!