Beispiel #1
0
        static void Main(string[] args)
        {
            Vehicle vehicle = new Vehicle();
            vehicle.Name = "Nissan Almera";
            vehicle.Model = "A car";

            Tire tire = new Tire();
            tire.Brand = "Nokia";
            tire.Size = 22;
            tire.Type = "Nastarengas";

            List<Vehicle> car = new List<Vehicle>();
            vehicle.AddTire(new Tire());
            vehicle.AddTire(new Tire());
            vehicle.AddTire(new Tire());
            vehicle.AddTire(new Tire());

            Console.WriteLine(vehicle.ToString());

        }
Beispiel #2
0
 public void AddTire(Tire tire)
 {
     Tires.Add(tire);
 }