''' 设计者:ISDF工软未来 版本:v1.0 日期:2024/3/4 '''class Restaurant:'''餐馆类'''def __init__(self,restaurant_name,cuisine_type):#类的属性self.restaurant_name = restaurant_nameself.cuisine_type = cuisine_type# self.stregth_level = 0def describe_restaurant(self):'''描述餐厅'''print(f'餐厅名字是{self.restaurant_name};菜品是{self.cuisine_type}')def open_reataurant(self):'''开餐厅'''print(f'{self.restaurant_name}餐厅正在营业')'''静态方法'''@staticmethoddef restaurant(a,b):print(a+b)'''类方法'''@classmethoddef myrestaurant(cls):Restaurant.restaurant(20,40) #类对象调用静态方法def mynerestaurant(self):self.restaurant(50,60) #类实例对象调用静态方法def main():'''主函数'''restaurant_name = input("请输入餐厅名称:")cuisine_type = input("请输入菜品名字:")#实例化restauranteg1=Restaurant(restaurant_name,cuisine_type)restauranteg1.describe_restaurant()restauranteg1.open_reataurant()Restaurant.restaurant(100,200)restauranteg1.restaurant(100,200)restauranteg1.myrestaurant()restauranteg1.mynerestaurant()if __name__ == '__main__':main()