# Exercise 9-4 Number Served 
# Learning Objective: Directly modify an instance of a class. 

class Restaurant: 
    def __init__(self, name, cuisine_type):
        """Initialize variables name and cuisine_type, define functions to describe and to open restaurant..."""

        self.name = name
        self.cuisine_type = cuisine_type
        self.number_served = 0

    def describe_restaurant(self):
        """Describe the restaurant"""
        print(f"The restaurant's name is {self.name} and the cuisine served here is {self.cuisine_type}")

    def open_restaurant(self):
        """Simulate it being opened"""
        print(f"{self.name} is now open for business.")
    
    def get_number_served(self):
        """Retrieve current number of customers that have been served."""
        print(f'{self.number_served} customers have been served at {self.name} so far.')

    def set_number_served(self, num):
        """ Enable manual modification to number of customers served"""
        self.number_served = num
    
    def increment_number_served(self):
        """Incremental change to number of customers served"""
        self.number_served += 1

restaurant = Restaurant("Henry's Hangry Hen House", "American Breakfast")
restaurant.get_number_served()
restaurant.open_restaurant()
#restaurant.set_number_served(80)
#restaurant.number_served += 50
for i in range(4) :
    restaurant.increment_number_served()
    restaurant.get_number_served()

