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 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. 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 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
