001package headfirst.iterator.dinermerger;
002
003public class MenuItem {
004        String name;
005        String description;
006        boolean vegetarian;
007        double price;
008
009        public MenuItem(String name,
010                        String description,
011                        boolean vegetarian,
012                        double price)
013        {
014                this.name = name;
015                this.description = description;
016                this.vegetarian = vegetarian;
017                this.price = price;
018        }
019
020        public String getName() {
021                return name;
022        }
023
024        public String getDescription() {
025                return description;
026        }
027
028        public double getPrice() {
029                return price;
030        }
031
032        public boolean isVegetarian() {
033                return vegetarian;
034        }
035        public String toString() {
036                return (name + ", $" + price + "\n   " + description);
037        }
038}