Skip to content

Instantly share code, notes, and snippets.

@StephanyBatista
Created May 12, 2019 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephanyBatista/3c282c7eebd73ebfccd0837d24efa048 to your computer and use it in GitHub Desktop.
Save StephanyBatista/3c282c7eebd73ebfccd0837d24efa048 to your computer and use it in GitHub Desktop.
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