Skip to content

Instantly share code, notes, and snippets.

@borncorp
Last active August 29, 2015 14:02
Show Gist options
  • Save borncorp/7d62c8dbb76ccf682bc9 to your computer and use it in GitHub Desktop.
Save borncorp/7d62c8dbb76ccf682bc9 to your computer and use it in GitHub Desktop.
Cookie Store Pseudocode
Have the customers select amount of cookies/cake/toppings etc..
Bring items to the cash register and ask to lookup his phone number on FB Database (if existing).
If customer doesnt have FB Account then store gives customer the choice to create an account or continue without.
If customer chooses to create an account then store creates an account asking the customer's phone#.
Store has to calculate the total.
If customer has FB Account.
Store has to validate the FB Account with the customer's phone#.
If number of purchases of customer's phone number is over 10 apply 10% off.
If number of purchases of customer's phone number is over 20 apply 20% off.
Store has to calculate the total with discount.
Customer pays for total if he has enough money.
--------
CUSTOMER
Responsibilities:
Select amount of cookies/cake/toppings
Ask store to lookup his FB Account using his phone# on FB Database.
Pay for total.
Collaborators:
Cookie
Cake
Topping
--------
STORE
Responsibilities:
Gives customer choice to create a FB Account.
Collaborators:
--------
FB ACCOUNT
Responsibilities:
Create an account using customer's phone#
Validate account using customer's phone#
Set total discount for account.
Collaborators:
Customer
--------
FB DATABASE
Responsibilities:
Create a FB account, ask for name and phone#
Lookup FB account using phone#
Collaborators:
FB Account
--------
COOKIE
Responsibilities:
Collaborators:
--------
TOPPINGS
Responsibilities:
Collaborators:
--------
CAKE
Responsibilities:
Collaborators:
--------
CAKE
Responsibilities:
Collaborators:
--------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment