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 CalculoDeSalario { | |
public CalculoDeSalario(RegrasFiscais regrasFiscais, ...) { | |
// ... | |
} | |
public double calcula(Funcionario f) { | |
if(f.getCargo() == Cargo.VENDEDOR) { | |
// calcula salario do vendedor usando regras fiscais, etc | |
} |
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 CalculoDeSalario { | |
public CalculoDeSalario(RegrasFiscais regrasFiscais, ...) { | |
// ... | |
} | |
public double calcula(Funcionario f) { | |
if(f.getCargo() == Cargo.VENDEDOR) { | |
// calcula salario do vendedor usando regras fiscais, etc | |
} |
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 CalculoDeSalario { | |
public CalculoDeSalario(RegrasFiscais regrasFiscais, ...) { | |
// ... | |
} | |
public double calcula(Funcionario f) { | |
AlgoritmoDeCalculoDeSalario calculadora = f.getCargo().getAlgoritmoDeCalculo(regrasFiscais); | |
return calculadora.calcula(); | |
} |
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 CalculadoraTest { | |
@Test | |
public void deveSomarUmMaisUm() { | |
assertEquals(2, new Calculadora().soma(1,1)); | |
} | |
@Test | |
public void deveSomarUmMaisDois() { | |
assertEquals(3, new Calculadora().soma(1,2)); | |
} |
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 CalculadoraTest { | |
@Test | |
public void deveSomarDoisNumerosPositivos() { | |
assertEquals(4, new Calculadora().soma(2,2)); | |
} | |
@Test | |
public void deveSomarPositivoComNegativo() { | |
assertEquals(4, new Calculadora().soma(6,-2)); | |
} |
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 exercicio.selenium; | |
import static junit.framework.Assert.assertTrue; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebDriverBackedSelenium; | |
import org.openqa.selenium.firefox.FirefoxDriver; |
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
teste mario |
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
\chapter{Exercícios} | |
\label{ape:exercicios} | |
Os exercícios são os mesmos para todos os grupos. O participante, em caso de dúvidas, poderá perguntar ao pesquisador. | |
\section{Lembrete ao participante} | |
Caro participante, | |
Lembre-se que os problemas aqui propostos simulam complicações do mundo real. |
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 br.com.caelum.leilao.servico; | |
public class Boleto { | |
private String nome; | |
private double valor; | |
public Boleto(String nome, double valor) { | |
this.nome = nome; | |
this.valor = 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
package br.com.caelum.gnarus.apostila; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.net.URL; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import br.com.caelum.gnarus.apostila.dominio.Exercicio; |
OlderNewer