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
| package exercicio.desconto; | |
| public class AplicadorDeDescontos { | |
| public void aplica(Compra compra) { | |
| descontoPorValor(compra); | |
| descontoPorProduto(compra); | |
| } | |
| private void descontoPorProduto(Compra compra) { |
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
| package exercicio.lista; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class GeradorDeResumo { | |
| public List<Resumo> gera(List<Negocio> negocios) { | |
| List<Resumo> resumos = new ArrayList<Resumo>(); |
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
| package exercicio.tdd.sessoes; | |
| import java.util.Calendar; | |
| import java.util.List; | |
| public class GeradorDeSessoes { | |
| public List<Sessao> gera(Calendar inicio, Calendar fim, Periodo periodo, int lugaresPorSessao) { | |
| // aqui... ;) | |
| return null; |
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
| protected DefaultSelenium browser; | |
| [SetUp] | |
| public void SetUp() | |
| { | |
| browser = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:49278"); | |
| browser.Start(); | |
| } | |
| [TearDown] |
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
| ** Exercise 1 - Salary calculator ** | |
| The participant should implement a salary calculator. An employee contains a name, | |
| an email, a base salary, and a position. According to his position, the calculation | |
| rule is different: | |
| - If he is a DEVELOPER, the employee should have a discount of 20% if his salary is | |
| greater than or equals to 3000.00. The discount should be only 10% if salary is smaller | |
| than that. | |
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
| Your name: | |
| How do you evaluate the clarity of the first exercise you implemented? Not clear 1-5 Very clear | |
| How do you evaluate the clarity of the second exercise you implemented? Not clear 1-5 Very clear | |
| How do you evaluate the time you had to solve each of the exercises? Not enough 1-5 More than needed | |
| Did you feel any difficulty to write test code to any of the exercises? |
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
| package br.com.caelum.tdd.exercicio1; | |
| import static br.com.caelum.tdd.exercicio1.Cargo.DBA; | |
| import static br.com.caelum.tdd.exercicio1.Cargo.DESENVOLVEDOR; | |
| import static br.com.caelum.tdd.exercicio1.Cargo.TESTER; | |
| public class CalculadoraDeSalario { | |
| public double calcula(Funcionario funcionario) { |
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
| package br.com.caelum.tdd.exercicio2; | |
| public interface EnviadorDeEmail { | |
| void enviaEmail(NotaFiscal nf); | |
| } |
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
| 2 nós | |
| hduser@hadoop-1:/usr/local/hadoop$ time bin/hadoop jar hadoop*examples*.jar wordcount -D mapred.reduce.tasks=16 /user/hduser/aniche /user/hduser/aniche-output3 | |
| Warning: $HADOOP_HOME is deprecated. | |
| 13/11/07 18:40:22 INFO input.FileInputFormat: Total input paths to process : 1 | |
| 13/11/07 18:40:22 INFO util.NativeCodeLoader: Loaded the native-hadoop library | |
| 13/11/07 18:40:22 WARN snappy.LoadSnappy: Snappy native library not loaded | |
| 13/11/07 18:40:23 INFO mapred.JobClient: Running job: job_201311071834_0004 | |
| 13/11/07 18:40:24 INFO mapred.JobClient: map 0% reduce 0% |
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
| 5 nos | |
| hduser@hadoop-1:/usr/local/hadoop$ time bin/hadoop jar hadoop*examples*.jar wordcount /user/hduser/aniche /user/hduser/aniche-5maqs-vai | |
| Warning: $HADOOP_HOME is deprecated. | |
| 13/11/07 20:47:29 INFO input.FileInputFormat: Total input paths to process : 1 | |
| 13/11/07 20:47:29 INFO util.NativeCodeLoader: Loaded the native-hadoop library | |
| 13/11/07 20:47:29 WARN snappy.LoadSnappy: Snappy native library not loaded |