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 interface Request { | |
String responde(Requisicao requisicao,Conta conta); | |
void proximo(Request proximo,Conta conta); | |
} | |
public class RequestBlank implements Request{ | |
public String responde(Requisicao requisicao, Conta conta) { | |
return null; |
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 interface Request { | |
String responde(Requisicao requisicao,Conta conta); | |
void proximo(Request proximo,Conta conta); | |
} | |
public class RequestBlank implements Request{ | |
public String responde(Requisicao requisicao, Conta conta) { | |
return null; |
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 Requisicao { | |
private Formato formato; | |
public Requisicao(Formato formato) | |
{ | |
this.formato = formato; | |
} | |
public Formato getFormato() { | |
return formato; |
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
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.List; | |
public class Orcamento { | |
private double valor; | |
private List<Item> itens; | |
public Orcamento(double valor) |
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 abstract class TemplateImposto implements Imposto{ | |
public double calculaImposto(Orcamento orcamento) { | |
if(usarMaximaTaxacao(orcamento)) | |
return maximaTaxacao(orcamento); | |
else | |
return minimaTaxacao(orcamento); | |
} |
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
package exercise4; | |
import java.util.List; | |
public abstract class TemplateRelatorio { | |
public void gerarRelatorio(MockData mock) | |
{ | |
gerarCabecalho(mock); | |
gerarCorpo(mock.getData()); | |
gerarRodape(mock); |
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 abstract class Imposto { | |
protected final Imposto outroImposto; | |
public Imposto(Imposto outroImposto){ | |
this.outroImposto = outroImposto; | |
} | |
public Imposto() | |
{ |
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 ImpostoMuitoAlto extends Imposto{ | |
public ImpostoMuitoAlto(Imposto outroImposto){ | |
super(outroImposto); | |
} | |
public ImpostoMuitoAlto() { | |
} | |
@Override |
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
import java.util.Date; | |
public class Conta { | |
private String nomeTitular; | |
private double saldo; | |
private Date dataDeAbertura; | |
public Conta(String nomeTitular,double saldo,Date dataDeAbertura) { | |
this.nomeTitular = nomeTitular; |
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 abstract class Imposto { | |
private final Imposto outroImposto; | |
public Imposto(Imposto outroImposto){ | |
this.outroImposto = outroImposto; | |
} | |
public Imposto(){ | |
this.outroImposto = null; |
OlderNewer