static void Main(string[] args) { //GiantPlanet testing GiantPlanet giantPlanet = new GiantPlanet("Feros", 16732, 1.879, "Ice"); Console.WriteLine(giantPlanet.ToString()); //TerrestrialPlanet testing TerrestrialPlanet terrestrialPlanet = new TerrestrialPlanet("Noveria", 11312, 0.63, true); Console.WriteLine(terrestrialPlanet.ToString()); WaitForAnyKey(); }
static void Main(string[] args) { Console.WriteLine("++++++ Giant Planet +++++"); //creating object for GiantPlanet GiantPlanet giantPlanet = new GiantPlanet("Jupiter", 139820, 1.898E27, "gas"); // calling ToString Method for object created Console.WriteLine(giantPlanet.ToString()); Console.WriteLine("+++++ Terrestrial Planet +++++"); //creating object for TerrestrialPlanet TerrestrialPlanet terrestrialPlanet = new TerrestrialPlanet("Earth", 12742, 5.972e24, true); //calling ToString Method Console.WriteLine(terrestrialPlanet.ToString()); }
/// <summary> /// Create and display object details of GiantPlanet /// and TerrestrialPlanet. /// </summary> /// <param name="args"></param> static void Main(string[] args) { // Create and display GiantPlanet object GiantPlanet giantPlanet = new GiantPlanet("Jupiter", 139820.0, 1898000000000000000000000000.0, "Gas"); Console.WriteLine("Giant Planet:"); Console.WriteLine(giantPlanet.ToString()); // Create and display TerrestrialPlanet object TerrestrialPlanet terrestrialPlanet = new TerrestrialPlanet("Earth", 12742.0, 5972000000000000000000000.0, true); Console.WriteLine("\nTerrestrial Planet:"); Console.WriteLine(terrestrialPlanet.ToString()); // Call waitForAnyKey() method waitForAnyKey(); }
static void Main(string[] args) { Console.WriteLine("Made by Taeho Kim"); Console.WriteLine("Student number: 300914207"); Console.WriteLine(); Console.WriteLine(); GiantPlanet GiantPlanet = new GiantPlanet("GiantPlanet", 5000000, 95000000, "IcE"); TerrestrialPlanet TerrestrialPlanet = new TerrestrialPlanet("TerrestrialPlanet", 15168, 6749, true); Console.WriteLine("============================================="); Console.WriteLine(GiantPlanet.ToString()); Console.WriteLine("============================================="); Console.WriteLine(); Console.WriteLine("============================================="); Console.WriteLine(TerrestrialPlanet.ToString()); Console.WriteLine("============================================="); WaitForAnyKey(); }