Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Cricket india = new Cricket();
            Cricket aus   = new Cricket();

            FootBall england = new FootBall();
            FootBall spain   = new FootBall();

            ShowGameDetails d = new ShowGameDetails();

            Console.WriteLine("-----------------Cricket Information----------------------");
            d.ShowCricketDetails("India", 11, "Ravi Shastri");
            d.ShowCricketDetails("Australia", 11, "Micle Clark");
            Console.WriteLine();
            Console.WriteLine();

            Console.WriteLine("-----------------FootBall Information----------------------");
            d.ShowFootBallDetails("England", 14, "English League");
            d.ShowFootBallDetails("Spain", 13, "Spainish League");
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();


            Game g = new Game();

            g.Year = 2011;
            g.WorldCup("India", "Cricket");
            g.WorldCup("Spain", "Football");
            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Cricket c1 = new Cricket();
            Cricket c2 = new Cricket();

            c1.Country     = "India";
            c1.NoOfPlayers = 11;
            c1.CoachName   = "John Wright";
            Console.WriteLine("------------CRICKET INFORMATION---------------");
            Console.Write("Country:" + c1.Country);
            Console.Write(" No Of Players:" + c1.NoOfPlayers);
            Console.Write(" Coach Name:" + c1.CoachName);
            c2.Country     = "Australia";
            c2.NoOfPlayers = 11;
            c2.CoachName   = "John Buchanan";
            Console.Write("                                                                   Country:" + c2.Country);
            Console.Write(" No Of Players:" + c2.NoOfPlayers);
            Console.Write(" Coach Name:" + c2.CoachName);
            FootBall f1 = new FootBall();
            FootBall f2 = new FootBall();

            f1.Country     = "spain";
            f1.NoOfPlayers = 14;
            f1.LeaugeName  = "Spanish League";
            Console.WriteLine("                                                             ------------FOOTBALL INFORMATION---------------");
            Console.Write("Country:" + f1.Country);
            Console.Write(" No Of Players:" + f1.NoOfPlayers);
            Console.Write(" League Name:" + f1.LeaugeName);
            f2.Country     = "England";
            f2.NoOfPlayers = 13;
            f2.LeaugeName  = ("English Premiur League");
            Console.Write("                                                               Country:" + f2.Country);
            Console.Write(" No Of Players:" + f2.NoOfPlayers);
            Console.Write(" League Name:" + f2.LeaugeName);
            Game g = new Cricket();

            g.WorldCup("Australia");
            Console.Read();
        }