Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class Carro
{
public Motor Motor { get; }
public Farol Farol { get; }
public Carro(Motor motor, Farol farol)
{
Motor = motor;
Farol = farol;
}
public void LigarMotor()
{
Motor.Ligar();
}
public void DesligarMotor()
{
Motor.Desligar();
}
public void AcenderFarol()
{
Farol.Acender();
}
public void DesligarFarol()
{
Farol.Desligar();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.