static void Main(string[] args) { GiantPlanet giantPlanet = new GiantPlanet("Saturn", 116460, 5.683e26, "gas"); Console.WriteLine(giantPlanet.ToString()); TerrestrialPlanet terrestrialPlanet = new TerrestrialPlanet("Venus", 12104, 4.867e24, false); Console.WriteLine(terrestrialPlanet.ToString()); }
static void Main(string[] args) { // Instantiate GiantPlanet object GiantPlanet giantPlanet = new GiantPlanet("Jupiter", 139820, 1.89800000000000003e+24, "gas"); Console.WriteLine(giantPlanet.ToString()); // Instantiate TerrestrialPlanet object TerrestrialPlanet terrestrialPlanet = new TerrestrialPlanet("Venus", 112104, 4.86700000000000026e+21, false); Console.WriteLine(terrestrialPlanet.ToString()); //call for key method waitForAnyKey(); }