Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA PROGRAMMING PLEASE! COBBLER This class derive from the Pastry class. This class define the methods as set by the interface. Cobbler +baseCost(): double +ingredientsNeeded():
JAVA PROGRAMMING PLEASE!
COBBLER This class derive from the Pastry class. This class define the methods as set by the interface. Cobbler +baseCost(): double +ingredientsNeeded(): Ingredient[] +description(): String The ingredients set for Cobbler are Fruit, Sugar, Salt, Butter, Flour, Baking Powder, Milk, Cinnamon. The description string the class return is: Cobbler. PIE This class derive from the Pastry class. This class define the methods as set by the interface; and set ingredients based on three different PieType. Pie Type is an enum as shown in the UML below. Pie +type: PieType +Pie(PieType) +Pie() +setPieType(PieType): void +getPieType(): PieType +baseCost(): double +ingredientsNeeded(): Ingredient[] +description(): String > PieType Cream Fruit Custard The default constructor sets the member variable type to Cream by default. The parameterized constructor sets the member variable type to the passed in PieType. tset PieType(PieType) is the mutator for member variable type. +getPieType() is the accessor for member variable type. The ingredients set for the different pies are: o Cream Pie: Milk, Cream, Sugar, Flour, Eggs. o Fruit Pie: Fruit, Sugar, Salt, Flour, Butter, Eggs. o Custard Pie: Milk, Cream, Sugar, Eggs. The description string the class return is: "Custard Pie", "Fruit Pie", or "Cream Pie based on the PieTypeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started