Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
controllers, views: introduce very early stage views and controllers
src/org/porcellis/controllers/ImovelController.java | 18 +++++++++++++++ src/org/porcellis/views/ImovelView.java | 15 ++++++++++++
diff --git a/src/org/porcellis/controllers/ImovelController.java b/src/org/porcellis/controllers/ImovelController.java new file mode 100644 index 0000000000000000000000000000000000000000..28ab51c5296964dfa2e27936edb750afaa1ec7f5 --- /dev/null +++ b/src/org/porcellis/controllers/ImovelController.java @@ -0,0 +1,18 @@ +package org.porcellis.controllers; + +import org.porcellis.models.Imovel; +import org.porcellis.views.ImovelView; + +public class ImovelController { + private Imovel imovel; + private ImovelView imovelView; + + public ImovelController(Imovel imovel, ImovelView imovelView) { + this.imovel = imovel; + this.imovelView = imovelView; + } + + public void mostrarDetalhesImovel() { + imovelView.mostrarDetalhesImovel(imovel); + } +} diff --git a/src/org/porcellis/views/ImovelView.java b/src/org/porcellis/views/ImovelView.java new file mode 100644 index 0000000000000000000000000000000000000000..bfafa6e879dc8621b8d9e59bd0a5fe539a8c13a7 --- /dev/null +++ b/src/org/porcellis/views/ImovelView.java @@ -0,0 +1,15 @@ +package org.porcellis.views; + +import org.porcellis.models.Imovel; + +public class ImovelView { + public void mostrarDetalhesImovel(Imovel imovel) { + System.out.println(imovel.toString()); + } + + public void mostrarITBI(Imovel imovel, double itbi) { + System.out.println( + "O ITBI do imóvel " + imovel.getEndereco().getLogradouro() + " é: " + imovel.getITBI() + ); + } +}