using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JAVA
{
public interface Valuable
{
void getMoney();
}
interface Protectable
{
void beProtected();
}
abstract class Animal
{
public abstract void enjoy();
}
class GoldenMonkey : Animal ,Valuable,Protectable
{
#region Protectable 成员
public void beProtected()
{
Console.WriteLine("333");
}
#endregion
#region Valuable 成员
public void getMoney()
{
Console.WriteLine("222");
}
#endregion
public override void enjoy()
{
Console.WriteLine("111");
}
}
class G : Protectable
{
#region Protectable 成员
public void beProtected()
{
Console.WriteLine("444");
}
#endregion
}
class test
{
static void Main()
{
//Valuable v = new GoldenMonkey();
//v.getMoney();
//Protectable p = (Protectable)v;
//p.beProtected();
//GoldenMonkey g = new GoldenMonkey();
//g.enjoy();
Protectable g = new G();
g.beProtected();
}
}
}