12.07.2015 Views

k19-k11-orientacao-a.. - Departamento de Sistemas e Computação

k19-k11-orientacao-a.. - Departamento de Sistemas e Computação

k19-k11-orientacao-a.. - Departamento de Sistemas e Computação

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

193 RESPOSTAS1617 System . out . println (f2. nome );18 System . out . println (f2. cargo );19 System . out . println (f2. salario );20 }21 }Código Java 3.23: TestaFuncionario.javaResposta do Complementar 3.5Adicione o seguinte arquivo na pasta <strong>orientacao</strong>-a-objetos.1 class Turma {2 String periodo ;3 int serie ;4 String sigla ;5 String tipoDeEnsino ;6 }Código Java 3.24: Turma.javaResposta do Complementar 3.6Adicione o seguinte arquivo na pasta <strong>orientacao</strong>-a-objetos. Depois compile e execute a classe TestaTurma.1 class TestaTurma {2 public static void main ( String [] aseries ) {3 Turma t1 = new Turma ();4 t1. periodo = " Tar<strong>de</strong> ";5 t1. serie = 8;6 t1. sigla = "A";7 t1. tipoDeEnsino = " Fundamental ";89 Turma t2 = new Turma ();10 t2. periodo = " Manha ";11 t2. serie = 5;12 t2. sigla = "B";13 t2. tipoDeEnsino = " Fundamental ";1415 System . out . println (t1. periodo );16 System . out . println (t1. serie );17 System . out . println (t1. sigla );18 System . out . println (t1. tipoDeEnsino );1920 System . out . println (t2. periodo );21 System . out . println (t2. serie );22 System . out . println (t2. sigla );23 System . out . println (t2. tipoDeEnsino );24 }25 }Código Java 3.25: TestaTurma.javaResposta do Complementar 3.7Altere a classe Aluno.www.<strong>k19</strong>.com.br 193

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!