Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Juice extends MenuItem {
- private String fruits;
- public Juice(String name, double price, String fruits) {
- super(name, price);
- this.fruits = fruits;
- }
- @Override
- public boolean isServedHot() {
- return false;
- }
- @Override
- public String toString() {
- return super.toString() + ", Fruits: " + fruits;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment