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:]
def main(): my_Customers = [] with open('data.csv', 'r') as file: reader = csv.reader(file) count=0 for row in reader: my_Customers.append(Cust(row[0],row[1],row[2],row[3])) my_Customers[count].getDescription() count +=1 return p = person.Employee()
def setUpClass(cls): """ Set up our Person client for tests.""" cls._person = person.Person("Testi", 34, '2342343434') cls._emp = person.Employee("Employee Tester", 45, "55555555555555", "Programmer", "3000", "Tampere")