コード例 #1
0
ファイル: Program.cs プロジェクト: m17guy/homework
        static void Main(string[] args)
        {
            mouse mouse = new mouse();
            cat   cat   = new cat();
            cow   cow   = new cow();

            cat.drink("beer");
            cat.drink(cow.getmilk());
            cat.eat(mouse);
            Console.ReadKey();
        }
コード例 #2
0
ファイル: cat.cs プロジェクト: m17guy/homework
 public void eat(mouse jery)
 {
     Console.WriteLine(name + " is eating " + jery.name);
     jery.die();
 }