Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("******GIANT PLANET******");
            Console.Write("------------------------");
            Console.WriteLine("\nPLANET INFORMATION");

            //instantiate giant planet object
            GiantPlanet giantPlanet = new GiantPlanet("Giant Planet A", 45, 283.33, "Ice");

            //show output
            Console.WriteLine($"{giantPlanet.ToString()}\n");

            Console.WriteLine("\n******TERRESTRIAL PLANET******");
            Console.Write("-------------------------------");
            Console.WriteLine("\nPLANET INFORMATION");
            //instantiate terrestrial planet object
            TerrestrialPlanet terrestrial = new TerrestrialPlanet("Terrestrial Planet A", 10.5, 55.5, false);

            //show output
            Console.WriteLine($"{terrestrial.ToString()}");



            Console.ReadKey();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("***\tPLANET++DIAMETER++MASS++DESCRIPTION*************************");
            Console.WriteLine();
            GiantPlanet Pluto = new GiantPlanet("Jupiter", 45.55, 20, "Gas");

            Console.WriteLine(Pluto.ToString());
            TerrestrialPlanet Planet = new TerrestrialPlanet("Mars", 21.3, 15, true);

            Console.WriteLine(Planet.ToString());
            Console.WriteLine();
            Console.WriteLine("********************************************************************");
            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            //Implement giantPlanet object
            GiantPlanet giantPlanet = new GiantPlanet("Jinwook 2", 50000, 200, "Gas");

            Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
            Console.WriteLine(giantPlanet.ToString() + " Type: " + giantPlanet.Type);
            Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");

            //Implement terrestrialPlanet object
            TerrestrialPlanet terrestrialPlanet = new TerrestrialPlanet("Jinwook 1", 2220000, 31312, true);

            Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
            Console.WriteLine(terrestrialPlanet.ToString() + " Oxyzen: " + terrestrialPlanet.Oxyzen);
            Console.WriteLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");


            waitForAnyKey();
        }
        static void Main(string[] args)
        {
            Console.WriteLine("_____________________________________________________________________");
            Console.WriteLine("Student Name: Shahzaib Malik                  Student ID: 300852792  |");
            Console.WriteLine("_____________________________________________________________________|");
            GiantPlanet jupiter = new GiantPlanet("Gaseous", "Jupiter", 139822, 1896454819784917000000000000.00);

            jupiter.OrbitalPeriod    = 11.86;
            jupiter.RotationalPeriod = 9.9;
            jupiter.MoonCount        = 0;
            jupiter.RingCount        = 4;
            jupiter.ToString();
            TerrestrialPlanet earth = new TerrestrialPlanet(true, "Earth", 12742, 5972454819784917000000000.00);

            earth.OrbitalPeriod    = 88;
            earth.RotationalPeriod = 365;
            earth.MoonCount        = 1;
            earth.ToString();
            WaitForAnyKey();
        }