Skip to content

Instantly share code, notes, and snippets.

@ellehallal
Last active June 12, 2019 13:17
Show Gist options
  • Save ellehallal/414a07ef95ed81690d7b5135bda99605 to your computer and use it in GitHub Desktop.
Save ellehallal/414a07ef95ed81690d7b5135bda99605 to your computer and use it in GitHub Desktop.
public abstract class PurchaseProcessTemplate {
public final void processPurchase() {
greetCustomer();
doSelectItems();
doPurchaseItems();
doDeliverItems();
thankCustomer();
}
public final void greetCustomer() {
System.out.println("Welcome to Elle's Boutique");
}
public abstract void doSelectItems();
public abstract void doPurchaseItems();
public abstract void doDeliverItems();
public final void thankCustomer() {
System.out.println("Thank you for shopping at Elle's Boutique");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment