Exemple #1
0
def main():
    name = input('Please enter your name: ')
    address = input('Please enter your address: ')
    telephone = input('Please enter your telephone number: ')
    customer_number = input('Please enter your customer number: ')

    customer = person.Customer(name, address, telephone, customer_number)

    customer.show_mailing_list()

    print('Name: ', customer.get_name())
    print('Address: ', customer.get_address())
    print('Telephone: ', customer.get_telephone())
    print('Customer Number: ', customer.get_customer_number())

    correct_information = input('Please verify your information.'\
                                "Enter 'n' if the information is not correct: ")
    correct_information.lower()

    while correct_information == 'n':
        name = input('Please enter your name: ')
        address = input('Please enter your address: ')
        telephone = input('Please enter your telephone number: ')
        customer_number = input('Please enter your customer number: ')

        customer = person.Customer(name, address, telephone, customer_number)

        print('Name: ', customer.get_name())
        print('Address: ', customer.get_address())
        print('Telephone: ', customer.get_telephone())
        print('Customer Number: ', customer.get_customer_number())

        correct_information = input('Please verify your information.'\
                                    "Enter 'n' if the information is not correct: ")
Exemple #2
0
def main():
    ## employee list (our cafe shop has four employees)
    employeeList = [
        person.Employee('창기'),
        person.Employee('재용'),
        person.Employee('건형'),
        person.Employee('은혁')
    ]

    ## Beverage menus (our cafe shop has below beverages)
    menus = {
        'Americano': beverage.Americano,
        'CafeLatte': beverage.CafeLatte,
        'Cappuccino': beverage.Cappuccino,
        'VanillaLatte': beverage.VanillaLatte,
        'CafeMocha': beverage.CafeMocha,
        'CaramelMaki': beverage.CaramelMaki,
        'HotChocolate': beverage.HotChocolate,
        'MintChocolate': beverage.MintChocolate
    }

    ## Customer Queue
    ### Using append, new customer is comming
    ### Using customerList[1:], dequeue customer that ordered beverages
    customerList = []

    ## Customer '시우' comes into the cafe
    customerList.append(person.Customer('시우'))

    ## Process the customer in the queue.
    for customer in customerList:
        processCustomerOrder(random.choice(employeeList), customer, menus)
        customerList = customerList[1:]

    ## Customer '소영', '진헌', '하윤' come into the cafe
    customerList.append(person.KoreaUniver('소영'))
    customerList.append(person.KoreaUniver('진헌'))
    customerList.append(person.Youth('하윤'))

    ## Process the customer in the queue.
    for customer in customerList:
        processCustomerOrder(random.choice(employeeList), customer, menus)
        customerList = customerList[1:]

    ## Customer '민준', '예준' come into the cafe
    customerList.append(person.Customer('민준'))
    customerList.append(person.Youth('예준'))

    ## Process the customer in the queue.
    for customer in customerList:
        processCustomerOrder(random.choice(employeeList), customer, menus)
        customerList = customerList[1:]
Exemple #3
0
def main():

    peep = person.Person('Emily Darin', '1206 Mary Ave Okemos, MI 48917',
                         '517-123-4564')

    print("Name:", peep.get_name())
    print("Address:", peep.get_address())
    print("Phone Number:", peep.get_phone_num(), '\n')

    peep = person.Customer('Teresa M. Potts',
                           '1206 Mary Ave Grand Ledge, MI 60126',
                           '517-123-4564', 1221)

    print("Name:", peep.get_name())
    print("Address:", peep.get_address())
    print("Phone Number:", peep.get_phone_num())
    print("Customer ID:", peep.get_cust_id(), '\n')

    peep = person.Vendor('Tim Belcher',
                         '1500 Abbot Rd Ste 100 East Lansing, MI 48823',
                         '517-456-4564', 4231)

    print("Name:", peep.get_name())
    print("Address:", peep.get_address())
    print("Phone Number:", peep.get_phone_num())
    print("Vendor ID:", peep.get_vendor_id())
def main():

    telepehone = input('Номер телефона: ')
    yn = input('Получать новости на телефон? да/нет ')

    # Создаю экземпляр клиента.
    customer = person.Customer(telepehone, yn)
    print()
    print('Номер телефона', customer.get_telephone())
    print(customer.get_yes_no())
Exemple #5
0
def main():
    print("Enter the following information.")
    name = input("Name: ")
    address = input("Address: ")
    phone = input("Phone Number: ")
    id = input("Customer ID: ")
    print("Does customer want to have an email subscription?")
    mail = input("(Y = yes, N = no): ")
    # lower the letter value in mail
    mail = mail.lower()

    customer_info = person.Customer(name, address, phone, id, mail)

    # display results
    print()
    print("Here is the data the you have entered.")
    print(str(customer_info))
    if customer_info.mail_sub():
        print("Subscription: ON")
    else:
        print("Subscription: OFF")
    print()