Created
February 1, 2021 20:56
-
-
Save anderson-marques/a7c38e926a293cdc89650bf53ae1b25a to your computer and use it in GitHub Desktop.
CafeteiraV1.java
This file contains hidden or 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 Cafeteira { | |
| public static void main( String[] args ) | |
| { | |
| System.out.println( "Bem vindo ao Cafe Sem Liskov!" ); | |
| Cafe cafezinho = new Cafe(); | |
| AcucarComum acucarComum = new AcucarComum(); | |
| AcucarEmCubos acucarEmCubos = new AcucarEmCubos(); | |
| AcucarMascavo acucarMascavo = new AcucarMascavo(); | |
| Mel mel = new Mel(); | |
| AdocanteArtificial adocanteArtificial = new AdocanteArtificial(); | |
| cafezinho.adicionarAcucarComum(acucarComum); | |
| cafezinho.adicionarAcucarEmCubos(acucarEmCubos); | |
| cafezinho.adicionarAcucarMascavo(acucarMascavo); | |
| cafezinho.adicionarAcucarEmCubos(acucarEmCubos); | |
| cafezinho.adicionarMel(mel); | |
| cafezinho.adicionarAdocanteArtificial(adocanteArtificial); | |
| System.out.println( cafezinho.saborAdocicado + " está doce demais!" ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment