示例#1
0
        static void Main(string[] args)
        {
            //Created a giant planet objecet
            GiantPlanet giantPlanet = new GiantPlanet("Jupiter", 139822, 317.8, "Gas");

            Console.WriteLine(giantPlanet.ToString());

            //Created  a terrestrial planet object
            TerrestrialPlanet terristrestrialPlanet = new TerrestrialPlanet("Earth", 12742, 1, true);

            Console.WriteLine(terristrestrialPlanet.ToString());
        }
示例#2
0
        /// <summary>
        /// main method, drive tests for classes.
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            GiantPlanet gp1 = new GiantPlanet("b612", 100, 200, "ice");

            Console.WriteLine(gp1);

            TerrestrialPlanet tp1 = new TerrestrialPlanet("t612", 300, 400, true);

            Console.WriteLine(tp1);

            waitForAnyKey();
        }