static void Main(string[] args) { Vehicle vehicle = new Vehicle(); vehicle.doors = 1; Console.WriteLine($"Vehicle object with {vehicle.doors} door(s) and {vehicle.state}\n"); Car car = new Car(); car.GetId(); car.doors = 4; //public property: doors car.mark = "Skoda"; //public property: mark Console.WriteLine($"Mark {car.mark}, {car.doors} door(s) and {vehicle.state}"); //default state from base class car.GetId(); car.SetFuel("Petrol"); //function for private property: fuel car.ConsoleFuel(); //logs private property from base class: fuel car.SetSpeed(); //method for protected property from base class: speed car.SetSpeed(200); //same method using overload Plane plane = new Plane(); plane.doors = 1; plane.company = "airline plane"; Console.WriteLine($"\nPlane {plane.company}, {plane.company} door(s)"); plane.GetId(); //function for private member in subclass plane.SetFuel("cherosen"); //overrid method from base class plane.ConsoleFuel(); plane.SetSpeed(1000); Truck truck = new Truck(); truck.doors = 2; Console.WriteLine($"Truck with {truck.doors} door(s) and {truck.state}"); truck.GetId(); truck.ChangeState(); Console.WriteLine($"Truck new state: {truck.state}"); Console.WriteLine($"\nTotal number of vehicles: {vehicle.GetNumberOfVehicles()}"); //method that counts STATIC (declared once and keep value and stored in momory) property from base that increments at every instance of a new object (in ctor) Console.ReadKey(); }