Develop an interface called “Event” which contains Expenditure (), Prizes () are unimplemented
methods. Also include few specifications given below,
A default method called welcome_msg(),
A static method called Thank_you msg(),
Create another interface called invitation that extends Event which contains design_invitation()
as private member and display_invitation() as public method
create two customized classes called Birthday and Symposium utilize the above structure;
interface Event{
public void Expenditure();
public void Prizes();
public void welcome_msg();
public void Thank_you_msg();
}
interface invitation extends Event{
public void design_invitation();
public void display_invitation();
}
class Birthday implements invitation {
public void Expenditure(){
}
public void Prizes(){
}
public void welcome_msg(){
}
public void Thank_you_msg(){
}
public void design_invitation(){
}
public void display_invitation(){
}
}
class Symposium implements invitation {
public void Expenditure(){
}
public void Prizes(){
}
public void welcome_msg(){
}
public void Thank_you_msg(){
}
public void design_invitation(){
}
public void display_invitation(){
}
}
public class Main
{
public static void main(String[] args) {
Birthday b=new Birthday();
Symposium s=new Symposium();
}
}
Comments
Leave a comment