abstract class Animal{
String name;
public abstract void speak();
}
interface Protectable{
void beProtected();
}
interface Valuable{
double getMoney();
}
class GoldenMonkey extends Animal implements Protectable,Valuable{
GoldenMonkey(String name){
this.name=name;
}
public void speak(){
System.out.println("monkey is speaking");
}
public void beProtected(){
System.out.println("live in the room");
}
public double getMoney(){
return 100000;
}
}
class TestMonkey{
public static void main(String args[]){
GoldenMonkey g1=new GoldenMonkey("xx");
g1.speak();
g1.beProtected();
System.out.println(g1.getMoney());
}
}