Advertisement
LoganBlackisle

MenuItems

Jun 14th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. package prep_29_iteratorpattern;
  2.  
  3. public class MenuItem {
  4. String name;
  5. String description;
  6. boolean vegetarian;
  7. double price;
  8.  
  9. public MenuItem(String name, String description, boolean vegetarian, double price) {
  10. this.name = name;
  11. this.description = description;
  12. this.vegetarian = vegetarian;
  13. this.price = price;
  14. }
  15.  
  16. public String getName() {
  17. return name;
  18. }
  19.  
  20. public String getDescription() {
  21. return description;
  22. }
  23.  
  24. public double getPrice() {
  25. return price;
  26. }
  27.  
  28. public boolean isVegetarian() {
  29. return vegetarian;
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement