Create an interface named as “TeaService” having following method abstract methods Boling Tea Serving Tea Is Tea Hot Create another interface named as “BiscuitService” having following method abstract methods Bake Biscuit Serving Biscuit Is Biscuit Baked Create another interface named as “TeaParty” having only one default method but inherit both interfaces: “TeaService” and “BiscuitService”. Default method name is “partyStarted” and displays “Party is started”. Create a class named “SchoolTeaParty” having two boolean attributes: bakedBiscuit and hotTea. Complete the class such that for the following main method it produces output as show below. Main Class with main method public class Main {                 public static void main(String[] args) {                                 SchoolTeaParty schoolTeaParty = new SchoolTeaParty();                                 schoolTeaParty.serveBiscuit();                                 schoolTeaParty.servingTea();                                 schoolTeaParty.bakeBiscuit();                                 schoolTeaParty.boilingTea();                                 schoolTeaParty.serveBiscuit();                                 schoolTeaParty.servingTea();                                 schoolTeaParty.partyStarted();                 } }

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter19: Probabilistic Dynamic Programming
Section19.4: Further Examples Of Probabilistic Dynamic Programming Formulations
Problem 7P
icon
Related questions
Question

Create an interface named as “TeaService” having following method abstract methods

  1. Boling Tea
  2. Serving Tea
  3. Is Tea Hot

Create another interface named as “BiscuitService” having following method abstract methods

  1. Bake Biscuit
  2. Serving Biscuit
  3. Is Biscuit Baked

Create another interface named as “TeaParty” having only one default method but inherit both interfaces: “TeaService” and “BiscuitService”. Default method name is “partyStarted” and displays “Party is started”.

Create a class named “SchoolTeaParty” having two boolean attributes: bakedBiscuit and hotTea. Complete the class such that for the following main method it produces output as show below.

Main Class with main method

public class Main {

                public static void main(String[] args) {

                                SchoolTeaParty schoolTeaParty = new SchoolTeaParty();

                                schoolTeaParty.serveBiscuit();

                                schoolTeaParty.servingTea();

                                schoolTeaParty.bakeBiscuit();

                                schoolTeaParty.boilingTea();

                                schoolTeaParty.serveBiscuit();

                                schoolTeaParty.servingTea();

                                schoolTeaParty.partyStarted();

                }

}

Output of the main method
We are waiting for baking biscuit
We are waiting for Tea to boil
We are baking biscuit
We are boiling the Tea
We are serving biscuit
We are Serving Tea
Party is started
Transcribed Image Text:Output of the main method We are waiting for baking biscuit We are waiting for Tea to boil We are baking biscuit We are boiling the Tea We are serving biscuit We are Serving Tea Party is started
Expert Solution
steps

Step by step

Solved in 6 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole