Question: Create an interface that represents the process of combining ingredients. The interface should define an action related to how the ingredients are combined ( for

Create an interface that represents the process of combining ingredients.
The interface should define an action related to how the ingredients are combined
(for example, mixing).
This mix method should not accept any arguments and should not return any
value.
Create an abstract class (Parent Class): that represents a general cake. This class
should include essential information for a cake:
Three integer data fields representing the quantities of ingredients: eggs, flour,
and sugar.
Create a constructor that accepts three parameters (for eggs, flour, and sugar) and
initializes the fields.
The class should also include an action that needs to be performed to complete
the cake preparation (such as baking). The exact way this action is carried out will
be defined by the specific types of cakes.
The abstract bake method has no arguments and no return value
Create a method to return a string that displays the quantities of eggs, flour, and
sugar.
Create a First Subclass of cupcake that extends from the abstract cake class and
implements the interface.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!