Answered step by step
Verified Expert Solution
Link Copied!

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():

image text in transcribed

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 PieType

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

90 Basic budgeting and accounting concepts.

Answered: 1 week ago

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago