using System;
public class Program
{
public static void Main()
//create the engine object
Engine engine = new Engine();
engine.Size = 4;
engine.Power = 5;
//create the carobject
Car car = new Car();
car.Size = "Mid Size";
car.SeatingCapacity = 5;
//add the engine object to the car object
car.Engine = engine;
int engineValue = car.Engine.CalulateAValue();
//return the engine value for the car
Console.WriteLine("The size of the engine is: " + car.Engine.Size.ToString());
}
public class Engine
public int Size;
public int Power;
//functions or methods here pertaining to the engine.
public int CalulateAValue()
return Size*Power;
public class Car
public string Size;
public int SeatingCapacity;
//Engine Object
public Engine Engine;