Advertisement
gastaojunior

Untitled

Jul 31st, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1.  
  2. import javax.swing.JOptionPane;
  3.  
  4. //Programa sugerido pela Miriã. Pegar nome e notas de 5 alunos
  5. //Após mostrar o nome e suas notas
  6. public class programaPegaNotaAluno {
  7.     public static void main(String[] args){
  8.         Aluno aluno[] = new Aluno[5];
  9.        
  10.         for(int i=0; i< 5; i++){
  11.             aluno[i] = new Aluno();
  12.             aluno[i].nome = JOptionPane.showInputDialog("Digite nome do aluno "+(i+1));
  13.             //Digitando as notas do aluno informado
  14.             for (int j=0; j<4; j++){
  15.                 aluno[i].notas[j] = Double.parseDouble(JOptionPane.showInputDialog("Digite a nota "+(j+1)+" do aluno "+aluno[i].nome));                
  16.             }
  17.         }
  18.        
  19.        
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement