Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Created February 7, 2018 12:57
Show Gist options
  • Save goyalrohit/71ec7b6c536c08455afcebd759f2159f to your computer and use it in GitHub Desktop.
Save goyalrohit/71ec7b6c536c08455afcebd759f2159f to your computer and use it in GitHub Desktop.
from order import Order
from customer import Customer
def main():
cust1 = Customer()
cust1.name = 'Rocky'
cust1.address = 'Florida'
cust1.enterprise = False
cust2 = Customer()
cust2.name = 'Jenifer'
cust2.address = 'California'
cust2.enterprise = True
ord1 = Order()
ord1.customer = cust1
ord1.expedited = False
ord1.shipping_address = 'Washington'
ord2 = (Order())
ord2.customer = cust2
ord2.expedited = True
ord2.shipping_address = 'California'
Order.orders = [ord1, ord2]
for name in ord1.get_expedited_orders_customer_names():
print(name)
for address in ord1.get_expedited_orders_customer_addresses():
print(address)
for address in ord1.get_expedited_orders_shipping_addresses():
print(address)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment