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...


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



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here