class Pursuit:GiveGift{
SchoolGirl mm;
public Puersuit(SchoolGirl mm){
this.mm=mm;
}
public void GiveDolls(){
Console.WriteLine(mm.Name+"送你洋娃娃");
}
public void GiveFlowers(){
Console.WriteLine(mm.Name+"送你鲜花");
}
public void GiveChocolate(){
Console.WriteLine(mm.Name+"送你巧克力");
}
}
1.4.代理类
class Proxy:GiveGift{
Pursuit gg;
public Proxy(SchoolGirl mm){
gg=new Pursuit(mm);
}
public void GiveDolls(){
gg.GiveDolls();
}
public void GiveFlowers(){
gg.GiveFlowers();
}
public void GiveChocolate(){
gg.GiveChocolate();
}
}