22 中介者模式/Program.cs
(完整代码) 807Busing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 中介者模式
{
//美国 伊拉克两个具体国家,中介是联合国机构作为抽象中介,具体的是联合国安理会
class Program
{
static void Main(string[] args)
{
UnitedNationsCouncil un = new UnitedNationsCouncil();
USA u = new USA(un);
Iraq i = new Iraq(un); //获得中介
un.U = u; //中介知道的两个具体国家对象
un.I = i;
u.Declare("不准研制核武器,否则要发动战争!");
i.Declare("我们没有核武器,也不怕侵略!");
Console.ReadLine();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。