Facebook
From Insensitive Macaque, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 136
  1. package Indeksy;
  2.  
  3. public class Indeksy2 {
  4.    
  5. private float[][]moduly;
  6.  
  7. Indeksy2(int liczba_studentow,int liczba_modulow){
  8.  
  9. this.moduly=new float [liczba_studentow][liczba_modulow];
  10.  
  11.     for(int x=0;x<moduly.length;x++){
  12.         for(int y=0;y<moduly[x].length;y++){
  13.     moduly[x][y]=0;
  14.        
  15.         }
  16.     }
  17. }
  18. public float obliczSrednia(int student){
  19. float srednia=0;
  20.  
  21. if(
  22.         for(int x=0;x<moduly[student].length;x++){
  23. moduly[x]>2.0;
  24. srednia=srednia/moduly.length;
  25.  return srednia;      
  26. }else return srednia=2;
  27.  
  28. }
  29.  
  30. public boolean zaliczony rok(int student){
  31.  
  32. if(srednia=>3.0){return true;}
  33.             else return false;
  34.  
  35. }
  36.  
  37. public void wpiszModul(int student,int modul,float ocena){
  38.  
  39. moduly[student][modul]=ocena;
  40.    
  41. }
  42.  
  43.  
  44.  
  45. }
  46.