Skip to content

Commit

Permalink
Resolvi alguns problemas, falta so o problema de numero repetido
Browse files Browse the repository at this point in the history
  • Loading branch information
dev authored and dev committed Nov 20, 2020
1 parent 676763c commit 1663812
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/conrollerCandidato/HashTableLinear.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 4,14 @@
import java.util.Scanner;

public class HashTableLinear {
public void HashTable(int n) {
public void HashTable() {
AleatorioController a = new AleatorioController();

HashLinear tab = new HashLinear(10);
int NumeroInscrissao;

for (int i = 0; i < 10; i ) {
NumeroInscrissao = n; //numero aleatorio
NumeroInscrissao = a.aleatorio(); //numero aleatorio
tab.insere(NumeroInscrissao);// � o vetor da estrutura da hash
}
System.out.print("\n\nImprimindo conteudo");
Expand Down
8 changes: 4 additions & 4 deletions src/conrollerCandidato/PrincipalController.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 7,11 @@ public void PrincipalC() {
AleatorioController a = new AleatorioController();
HashTableLinear h = new HashTableLinear();
int NumeroInscrissao;
for(int i =0; i<10; i ) {
NumeroInscrissao = a.aleatorio();
h.HashTable(NumeroInscrissao);

//NumeroInscrissao = a.aleatorio();
h.HashTable();

}


}

Expand Down

0 comments on commit 1663812

Please sign in to comment.