Need Help ?

Home >> Assignments >> computer_science >> Restaurant: Make for Restaurant should store two attributes: a restaurant_name and a cuisine type

(Solved): Restaurant: Make for Restaurant should store two attributes: a restaurant_name and a cuisine type ...



TRY IT YOURSELF 9-1. Restaurant: Make for Restaurant should store two attributes: a restaurant_name and a cuisine type Make a method called describe_restaurant() that prints these two pieces of a class called Restaurant. The init () method information, and a method called open restaurant () that prints a message indi- cating that the restaurant is open. Make an instance called restaurant from your class. Print the two attri- butes individually, and then call both methods. 9-2. Three Restaurants: Start with your class from Exercise 9.1. Create three different instances from the class, and call describe restaurant () for each instance. 9-3. Users: Make a class called user. Create two attributes called first name and last_name, and then create several other attributes that are typically stored in a user profile. Make a method called describe user) that prints a summary of the user's information. Make another method called greet user() that prints a personalized greeting to the user. methods Create several instances representing different users, and call both for each user



We have an Answer from Expert

View Expert Answer

Get Expert Solution


code

class Restaurant:#creat the class Restaurant
def __init__(self,name,cuisine):#initialize method for setting name and cuisine of the restaurant
self.restaurant_name=name
self.restaurant_cuisine_type=cuisine

We have an Answer from Expert

Buy This Answer $5

Place Order

QUICK ORDER

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing
Order Now