static void Main(string[] args) { Vehicle vehicle = new Vehicle("Ford", 80, 4); vehicle.PrintData(); vehicle.Name = "Kawasaki"; vehicle.Speed = 120; vehicle.Tires = 2; vehicle.PrintData(); }
static void Main(string[] args) { Vehicle car = new Vehicle("Tesla", "Model S"); Console.WriteLine(car.ToString()); car.RemoveTyres(); Console.WriteLine(car.ToString()); car.AddTyre(new Tyre("Nokia", "Hakkaapäälle", "195/65R15")); car.AddTyre(new Tyre("Nokia", "Hakkaapäälle", "195/65R15")); car.AddTyre(new Tyre("Nokia", "Hakkaapäälle", "195/65R15")); Console.WriteLine(car.ToString()); }