M1RAI

Etudiant.class

Oct 13th, 2021 (edited)
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Etudiant{
  2.     private String nom = new String();
  3.     private double note1,note2,note3,note4;
  4.     public Etudiant(String[] name,double n1,n2,n3,n4){
  5.         nom=name;
  6.         note1=n1;
  7.         note2=n2;
  8.         note3=n3;
  9.         note4=n4;
  10.     }
  11.     protected void Affnote(){
  12.         System.out.println(note1 + "/" + note2 + "/" + note3 + "/" + note4 + "\n");
  13.     }
  14.     public double Moy(){
  15.         return (note1+note2+note3+note4)/4;
  16.     }
  17.     public void Verifadmis(){
  18.         if(Moy() >= 10){
  19.             System.out.println("admis");
  20.         }
  21.         else{
  22.             System.out.println("Refusé");
  23.         }
  24.     }
  25.  
  26. }
RAW Paste Data Copied