Question: Implement these using python TRY IT YOURSELF 9-6. Ice Cream Stand: An ice cream stand is a specific kind of restaurant. Write a class called

Implement these using python  Implement these using python TRY IT YOURSELF 9-6. Ice Cream Stand:

TRY IT YOURSELF 9-6. Ice Cream Stand: An ice cream stand is a specific kind of restaurant. Write a class called IceCreamstand that inherits from the Restaurant class you wrote in Exercise 9.1 (page 166) or Exercise 9-4 (page 171]. Either version of the class will work; just pick the one you like better. Add an attribute called flavors that stores a list of ice cream flavors. Write a method that displays these favors. Create an instance of IceCreamStand, and call this method 9-7. Admin: An administrator is a special kind of user. Write a class called Admin that inherits from the User class you wrote in Exercise 9.3 (page 166) or Exercise 9-5 (page 171). Add an attribute, privileges, that stores a list of strings like "can add post", "can delete post", "can ban user", and so on. Write a method called show privileges() that lists the administrator's set of privileges. Create an instance of Admin, and call your method. 9-8. Privileges: Write a separate Privileges class. The class should have one attribute, privileges, that stores a list of strings as described in Exercise 9-7 Move the show privileges() method to this class. Make a Privileges instance as an attribute in the Admin class. Create a new instance of Admin and use your method to show its privileges 9-9. Battery Upgrade: Use the final version of electric_ car.py from this section. Add a method to the Battery class called upgrade battely). This method should check the battery size and set the capacity to 85 if it isn't already Make an electric car with a default battery size, call get range) once, and then call get range() a second time after upgrading the battery You should see an increase in the car's range

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!