Created
January 2, 2024 15:00
-
-
Save vmussak/ffda2bc9408fb5d975ae1a232ad8c02f to your computer and use it in GitHub Desktop.
Implementação da mensagem de boas-vindas sem SOLID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MensagemBoasVindas | |
{ | |
public string CriarMensagem(Cliente cliente) | |
{ | |
if (cliente.Tipo == "Padrão") | |
{ | |
return $"Olá, {cliente.Nome}, estamos felizes que esteja conosco!"; | |
} | |
else if (cliente.Tipo == "Premium") | |
{ | |
return $"Olá, {cliente.Nome}, estamos felizes que esteja conosco! Você tem 50% de desconto para a primeira compra."; | |
} | |
else | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment