Advertisement
Guest User

student2

a guest
Nov 19th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. package student;
  2.  
  3. /**
  4.  *
  5.  * @author Ayoub
  6.  */
  7. public class Point {
  8.     String [] name;
  9.     int    [] points;
  10.    
  11.     public void SetPoint(String [] sName,int [] sPoint)
  12.     {
  13.        
  14.         this.name  = sName;
  15.         this.points = sPoint;
  16.         for(int x = 0; x < this.name.length; x++)
  17.         {
  18.             System.out.println("The Student name is : " + this.name[x] + " - and there Point is : " + this.points[x]);
  19.         }
  20.  
  21.     }
  22.    
  23.     public void ShowResult()
  24.     {
  25.         System.out.println("-----------------------------------------------------------");
  26.         for(int x = 0; x < this.name.length; x++)
  27.         {
  28.             if(this.points[x] >= 10){
  29.            
  30.                 System.out.println("The Student : " + this.name[x] + " is successful" );
  31.             }else if(this.points[x] <= 9){
  32.                 System.out.println("The Student : " + this.name[x] + " must to Repeats Year" );
  33.             }
  34.         }
  35.     }
  36.  
  37.    
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement