static void Main(string[] args) { // create a new Heater object Heater heater = new Heater(); heater.IsOn = true; heater.Temperature = 100; heater.Humidity = 95; heater.PrintData(); Console.WriteLine(heater.ToString()); Console.ReadLine(); }
static void Main(string[] args) { Heater Harvia = new Heater(); Harvia.Temperature = 50; Harvia.Humidity = 75; Harvia.IsOn = true; Harvia.MoreHeat(); Harvia.MoreHumidity(); Harvia.PrintData(); Console.WriteLine("Temperature = " + Harvia.Temperature); Harvia.IsOn = false; Harvia.PrintData(); Harvia.ToString(); Console.WriteLine(Harvia.ToString()); Console.ReadLine(); }