Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public class NYStylePizzaStore extends PizzaStore {
  2.  
  3. @Override
  4. Pizza createPizza(String type) {
  5. if (type.equals("cheese")) {
  6. return new NYStyleCheesePizza();
  7. } else if (type.equals("clam")) {
  8. return new NYStyleClamPizza();
  9. } else if (type.equals("veggie")) {
  10. return new NYStyleVeggiePizza();
  11. } else {
  12. return null;
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement