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(); }
static void Main(string[] args) { Console.WriteLine("===========================================================\n"); Console.WriteLine("Shakil Hosin -- 300922629 -- Assignment 4 -- Abstract Planets"); Console.WriteLine("===========================================================\n"); //Giant Planet Object GiantPlanet Shaktopia = new GiantPlanet("Shaktopia", 200000, 10000000020, "gas"); Shaktopia.OrbitalPeriod = 95; Shaktopia.RotationPeriod = 762; Shaktopia.MoonCount = 5; Shaktopia.RingCount = 0; Console.WriteLine("STATS"); Console.WriteLine(Shaktopia); Console.WriteLine("Has Moons?"); Console.WriteLine(Shaktopia.HasMoons() ? "Yes" : "No"); Console.WriteLine("Has Rings?"); Console.WriteLine(Shaktopia.HasRings() ? "Yes" : "No"); Console.WriteLine("==========================================================="); //Terrestrial Planet Object TerrestrialPlanet Torontoplo = new TerrestrialPlanet("Torontoplo", 28060708, 912827633674746434.393, true); Torontoplo.OrbitalPeriod = 18; Torontoplo.RotationPeriod = 190; Torontoplo.MoonCount = 0; Torontoplo.RingCount = 1; Console.WriteLine(); Console.WriteLine("STATS"); Console.WriteLine(Torontoplo); Console.WriteLine("Has Moons?"); Console.WriteLine(Torontoplo.HasMoons() ? "Yes" : "No"); Console.WriteLine("Habitable?"); Console.WriteLine(Torontoplo.Habitable() ? "Yes" : "No"); Console.WriteLine("==========================================================="); WaitForKey(); }