Skip to content

Commit

Permalink
exercicios 1-5 da lista 6 resolvidos
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorocha committed Jun 29, 2011
1 parent 8f710dd commit b1d48cb
Show file tree
Hide file tree
Showing 242 changed files with 261 additions and 5 deletions.
Empty file.
Binary file added build/classes/Exercicio02/banco/app/BancoApp.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/Exercicio02/banco/ui/BancoUI.class
Binary file not shown.
Binary file added build/classes/Exercicio07/Exercicio07.class
Binary file not shown.
Binary file added build/classes/Exercicio07/Produto.class
Binary file not shown.
Binary file added build/classes/Exercicio08/Exercicio08.class
Binary file not shown.
Binary file added build/classes/Exercicio08/Produto.class
Binary file not shown.
Binary file added build/classes/Exercicio08/decrescente.class
Binary file not shown.
Binary file added build/classes/Exercicio10/Exercico10.class
Binary file not shown.
Binary file added build/classes/Exercicio10/IProdutoDAO.class
Binary file not shown.
Binary file added build/classes/Exercicio10/Produto.class
Binary file not shown.
Binary file added build/classes/Exercicio10/ProdutoDAOXML.class
Binary file not shown.
Binary file added build/classes/Exercicio10/ProdutosDAO.class
Binary file not shown.
Binary file added build/classes/Exercicio11/Aluno.class
Binary file not shown.
Binary file added build/classes/Exercicio11/Disciplina.class
Binary file not shown.
Binary file added build/classes/Exercicio11/testeAluno.class
Binary file not shown.
Binary file added build/classes/Exercicio1ao5/ConversorDistancia.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/Exercicio6/ConversorDistancia.class
Binary file not shown.
Binary file added build/classes/Exercicio6/ConversorTemperatura.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/Exercicio7/ConversorDistancia.class
Binary file not shown.
Binary file added build/classes/Exercicio7/ConversorTemperatura.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions build/classes/br/blog/arruda/lista8/ex1/CelsiusToF.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
br.blog.arruda.lista8.CelsiusToF$4
br.blog.arruda.lista8.CelsiusToF$3
br.blog.arruda.lista8.CelsiusToF$2
br.blog.arruda.lista8.CelsiusToF$1
br.blog.arruda.lista8.CelsiusToF
br.blog.arruda.lista8.CelsiusToF$7
br.blog.arruda.lista8.CelsiusToF$6
br.blog.arruda.lista8.CelsiusToF$5
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio02.banco.app.BancoApp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio02.banco.negocio.BancoAppException
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio02.banco.negocio.Conta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio02.banco.ui.BancoUI
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista5/negocio/Exemplo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
negocio.Exemplo
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista5/negocio/Produto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
negocio.Produto
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista5/ui/AppExemplo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui.AppExemplo
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/ExemploReflection.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.ExemploReflection
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio01.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio01
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio02.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio02
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio03.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio03
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio04.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio04
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio05.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio05
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio06.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio06
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio07.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio07
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio08.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio08
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio09.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio09
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio11.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio11
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Exercicio12.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Exercicio12
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Piloto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Piloto
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/Produto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.Produto
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/ProdutoEspecial.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista6.ProdutoEspecial
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/ex10/Exercico10.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio10.Exercico10
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/ex10/IProdutoDAO.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio10.IProdutoDAO
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/ex10/Produto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio10.Produto
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio10.ProdutoDAOXML
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista6/ex10/ProdutosDAO.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio10.ProdutosDAO
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exemplo01.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exemplo01
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ExemploProdutos.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.ExemploProdutos
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio01.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio01
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio02.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio02
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio03.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio03
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio04.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio04
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio05.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio05
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio06.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio06
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio09.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio09
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Exercicio10.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Exercicio10
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/Produto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lista7.Produto
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex11/Aluno.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio11.Aluno
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex11/Disciplina.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio11.Disciplina
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex11/testeAluno.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio11.testeAluno
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex7/Exercicio07.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio07.Exercicio07
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex7/Produto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio07.Produto
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex8/Exercicio08.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio08.Exercicio08
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex8/Produto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio08.Produto
1 change: 1 addition & 0 deletions build/classes/br/com/lanchinho/lista7/ex8/decrescente.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio08.decrescente
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio1ao5.ConversorDistancia
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio1ao5.ConversorTemperatura
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Exercicio1ao5.FormConversorTemperatura
Exercicio1ao5.FormConversorTemperatura$5
Exercicio1ao5.FormConversorTemperatura$4
Exercicio1ao5.FormConversorTemperatura$6
Exercicio1ao5.FormConversorTemperatura$1
Exercicio1ao5.FormConversorTemperatura$3
Exercicio1ao5.FormConversorTemperatura$2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio6.ConversorDistancia
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio6.ConversorTemperatura
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Exercicio6.FormConversorTemperatura$6
Exercicio6.FormConversorTemperatura$7
Exercicio6.FormConversorTemperatura$2
Exercicio6.FormConversorTemperatura$3
Exercicio6.FormConversorTemperatura$4
Exercicio6.FormConversorTemperatura$5
Exercicio6.FormConversorTemperatura
Exercicio6.FormConversorTemperatura$1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio7.ConversorDistancia
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exercicio7.ConversorTemperatura
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Exercicio7.FormConversorTemperatura$3
Exercicio7.FormConversorTemperatura$4
Exercicio7.FormConversorTemperatura
Exercicio7.FormConversorTemperatura$5
Exercicio7.FormConversorTemperatura$6
Exercicio7.FormConversorTemperatura$1
Exercicio7.FormConversorTemperatura$2
Binary file added build/classes/com/zenorocha/lista1/Exercicio01.class
Binary file not shown.
Binary file added build/classes/com/zenorocha/lista1/Exercicio02.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/lista1/Exercicio09.class
Binary file not shown.
Binary file added build/classes/com/zenorocha/lista1/Exercicio10.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/lista5/ex1/main.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/classes/com/zenorocha/lista6/Exercicio02.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/lista6/Exercicio06.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/Empregado.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/Empresa.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/INome.class
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/IPagamento.class
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/Locomotiva.class
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/Recurso.class
Binary file not shown.
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/Trem.class
Binary file not shown.
Binary file added build/classes/com/zenorocha/modulo4/Vagao.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/classes/lista6/ExemploReflection.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio01.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio02.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio03.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio04.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio05.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio06.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio07.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio08.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio09.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio11.class
Binary file not shown.
Binary file added build/classes/lista6/Exercicio12.class
Binary file not shown.
Binary file added build/classes/lista6/Piloto.class
Binary file not shown.
Binary file added build/classes/lista6/Produto.class
Binary file not shown.
Binary file added build/classes/lista6/ProdutoEspecial.class
Binary file not shown.
Binary file added build/classes/lista7/Exemplo01.class
Binary file not shown.
Binary file added build/classes/lista7/ExemploProdutos.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio01.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio02.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio03.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio04.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio05.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio06.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio09.class
Binary file not shown.
Binary file added build/classes/lista7/Exercicio10.class
Binary file not shown.
Binary file added build/classes/lista7/Produto.class
Binary file not shown.
Binary file added build/classes/negocio/Exemplo.class
Binary file not shown.
Binary file added build/classes/negocio/Produto.class
Binary file not shown.
Binary file added build/classes/ui/AppExemplo.class
Binary file not shown.
2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
auxiliary.org-netbeans-modules-projectimport-eclipse-core.key=src=src;output=bin;
auxiliary.org-netbeans-modules-projectimport-eclipse-core.project=.
auxiliary.org-netbeans-modules-projectimport-eclipse-core.timestamp=1309312170000
auxiliary.org-netbeans-modules-projectimport-eclipse-core.timestamp=1309319817000
auxiliary.org-netbeans-modules-projectimport-eclipse-core.workspace=..
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
Expand Down
Binary file added saidaBinaria.dat
Binary file not shown.
6 changes: 2 additions & 4 deletions src/com/zenorocha/lista6/Exercicio02.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
public class Exercicio02 {

public static void main(String args[]) {
//wtf?! string?!
// Scanner input = new Scanner("System.in");

Scanner input = new Scanner(System.in);
Boolean continua = true;

Expand All @@ -56,8 +55,7 @@ public static void main(String args[]) {
texto = input.nextLine();

if (!texto.equals("")) {

//writer.println(texto);
writer.println(texto);
}
else {
continua = false;
Expand Down
47 changes: 47 additions & 0 deletions src/com/zenorocha/lista6/Exercicio03.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Lista 6
* Projeto e Construção de Sistemas
* Professor: Alexandre Correa
*
* Implementado por Zeno Rocha
* Em 29/06/2011
*
* --------------------------------------------------------------------------------------------
*
* Exercício 3
*
* Faça um programa que leia um texto do arquivo gerado no exercício anterior e imprima
* no console o seu conteúdo.
*
*/

package com.zenorocha.lista6;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class Exercicio03 {

public static void main (String args[]) throws IOException {

try {

FileReader arquivo = new FileReader("exemplo.txt");
BufferedReader leitor = new BufferedReader(arquivo);

while (leitor.ready()) {
String linha = leitor.readLine();
System.out.println(linha);
}

leitor.close();

}
catch (IOException ex) {
ex.printStackTrace();
}

}

}
53 changes: 53 additions & 0 deletions src/com/zenorocha/lista6/Exercicio04.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Lista 6
* Projeto e Construção de Sistemas
* Professor: Alexandre Correa
*
* Implementado por Zeno Rocha
* Em 29/06/2011
*
* --------------------------------------------------------------------------------------------
*
* Exercício 4
*
* Faça um programa que permita que o usuário entre 10 números a partir do console e
* armazene esses 10 números em um arquivo em formato binário.
*
*/

package com.zenorocha.lista6;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;

public class Exercicio04 {

public static void main (String args[]) throws IOException {

try {

DataOutputStream oos = new DataOutputStream(new FileOutputStream("saidaBinaria.dat"));

Scanner scanner = new Scanner(System.in);

int totalDeNumeros = 10;

for (int i = 0; i < totalDeNumeros; i++) {
System.out.print("\nEntre com um número: ");
oos.writeInt(scanner.nextInt());
}

oos.close();

System.out.println("\nArquivo gerado com sucesso.");

}
catch (IOException ex) {
System.out.println(ex.getMessage());
}

}

}
48 changes: 48 additions & 0 deletions src/com/zenorocha/lista6/Exercicio05.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Lista 6
* Projeto e Construção de Sistemas
* Professor: Alexandre Correa
*
* Implementado por Zeno Rocha
* Em 29/06/2011
*
* --------------------------------------------------------------------------------------------
*
* Exercício 5
*
* Faça um programa que leia o conteúdo do arquivo gerado no programa anterior e
* imprima a média dos números presentes no arquivo.
*
*/

package com.zenorocha.lista6;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class Exercicio05 {

public static void main (String args[]) {

try {
DataInputStream input = new DataInputStream(new FileInputStream("saidaBinaria.dat"));

int media = 0;
int totalDeNumeros = 10;

for (int i = 0; i < totalDeNumeros; i++) {
media += input.readInt();
}

System.out.println("Média = " + (media / totalDeNumeros));

input.close();
}
catch (IOException ex) {
System.out.println(ex.getMessage());
}

}

}
28 changes: 28 additions & 0 deletions src/com/zenorocha/lista6/Exercicio06.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Lista 6
* Projeto e Construção de Sistemas
* Professor: Alexandre Correa
*
* Implementado por Zeno Rocha
* Em 29/06/2011
*
* --------------------------------------------------------------------------------------------
*
* Exercício 6
*
* Seja uma classe Produto com atributos nome (string), código (int) e preço (double), faça
* um programa que instancie alguns produtos (ex: 3 produtos), armazenando suas
* referências em um array. Em seguida, armazene os dados desses três produtos em um
* arquivo via serialização binária.
*
*/

package com.zenorocha.lista6;

public class Exercicio06 {

public static void main (String args[]) {

}

}

0 comments on commit b1d48cb

Please sign in to comment.