reaproveitamento-poo-java

commit 5e09630e1f526d7ec03bdbaa5d7bd36ac18be37b

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

main: add basic creation

 src/org/porcellis/Main.java | 46 +++++++++++++++++++++++++++++++++++++++


diff --git a/src/org/porcellis/Main.java b/src/org/porcellis/Main.java
index a396b735894d4040ae18edd92515256b2e1d5a86..24067469a2a2b12e1c2ccea1687cbeee050010bb 100644
--- a/src/org/porcellis/Main.java
+++ b/src/org/porcellis/Main.java
@@ -1,7 +1,53 @@
 package org.porcellis;
 
+import org.porcellis.models.Casa;
+import org.porcellis.models.Endereco;
+
+import org.porcellis.controllers.ImovelController;
+import org.porcellis.views.ImovelView;
+
 public class Main {
 	public static void main(String[] args) {
 		System.out.println("Olá!");
+
+		Endereco enderecoCasa = new Endereco(
+			"Rua",
+			"Rua dos Bobos",
+			"Laranjeiras",
+			"Pelotas",
+			"RS",
+			"96001-970"
+		);
+
+		Casa casa = new Casa(enderecoCasa, 100.0, 100000.0, 120000.0, 200.0);
+
+		Endereco enderecoApartamento = new Endereco(
+			"Avenida",
+			"Avenida dos Bobos",
+			"Centro",
+			"Porto Alegre",
+			"RS",
+			"90001-970"
+		);
+
+		Apartamento apartamento = new Apartamento(
+			enderecoApartamento,
+			100.0,
+			100000.0,
+			120000.0,
+			200.0,
+			10.0
+		);
+
+		ImovelView imovelView = new ImovelView();
+
+		// XXX: Não seria melhor usar um for loop para iterar sobre os imóveis?
+		ImovelController imovelController = new ImovelController(casa, imovelView);
+		imovelController.mostrarDetalhesImovel();
+
+		imovelController = new ImovelController(apartamento, imovelView);
+		imovelController.mostrarDetalhesImovel();
+
+		System.out.println("Tchau!");
 	}
 }