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(); } }
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();
}
}


Step by step
Solved in 6 steps with 1 images









