Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1. String nomeInput=tastiera.readLine();
  2. boolean trovato = false;
  3. int indiceAlunno = -1;
  4.  
  5. for (int i=0; i<14; i++){
  6.     String nomeDiConfronto = elencoAlunni[i];
  7.     if (nomeDiConfronto.equalsIgnoreCase(nomeInput)){
  8.         indiceAlunno = 1;
  9.         trovato = true;
  10.         break();
  11.     }
  12. }
  13.  
  14. if (trovato){
  15.  
  16.     Verifica verificaInput = new Verifica();
  17.     /*
  18.     * Insieme di istruzioni per popolare l'oggetto verifica
  19.     * usando sempre il tastiera.readdLine() se è quello che vi
  20.     * hanno insegnato ^^
  21.     */
  22.  
  23.  
  24.  
  25.     /*
  26.     * inputNumeroVerifiche è un int che ti hanno fornito all'inizio con
  27.     * il quale hai creato dinamicamente la matrice
  28.     */
  29.  
  30.     boolean inserito = false;
  31.     for (int j=0; j<inputNumeroVerifiche && !inserito j++){
  32.         Verifica oggMatrice = matriceStatistica[0][j];
  33.         if (oggMatrice.getVoto()==-1){
  34.             matriceStatistica[0][j] = verfificaInput;
  35.             inserito = true;
  36.         }
  37.     }
  38.     if (!inserito){
  39.         /*
  40.         * Gestire un errore perchè vuol dire che il numero
  41.         * di voti comunicato all'inizio è minore di quelli
  42.         * che mi sta fornendo in input
  43.         */
  44.     }
  45. }
  46. else{
  47.     /*
  48.     * Gestire un errore perchè vuol dire che
  49.     * lo studente non è nel database
  50.     */
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement