import java.util.Scanner ;public class Problem1{  public static void main(String args){    Scanner input = new Scanner(System.in) ;    String id = ” “, dept =  ” ” , gender = ” ” , term = ” ”  ;    while ( id.

charAt(0)  != ‘0’)     {      System.out.println(“Please enter a student ID. “);      id = input.nextLine() ;      char ary = new charid.length() ;      for ( int i = 0 ; i

length() ; i++ )      {        aryi = id.charAt(i) ;      }      if (id.length() == 8 )      {                if ( ary2 == ‘1’  )        {          gender = “He” ;        }        if ( ary2 == ‘2’  )        {          gender = “she” ;        }        if ( ary3 == ‘1’  )        {          term = “fall” ;        }        if ( ary3 == ‘2’  )        {          term = “winter” ;        }        if ( ary0 == ‘1’ && ary1 == ‘0’ )        {          dept = “Science” ;        }        if ( ary0 == ‘1’ && ary1 == ‘1’ )        {          dept = “Engineering” ;        }        if ( ary0 == ‘1’ && ary1 == ‘2’ )        {          dept = “Nursing” ;        }        String year = id.substring(4,8) ;        int yearnum = Integer.

parseInt(year) ;                boolean a = ( ary0 == ‘1’ && ary1 == ‘0’ ) ;        boolean b = ( ary0 == ‘1’ && ary1 ==’1′ ) ;        boolean c = ( ary0 == ‘1’ && ary1 == ‘2’ ) ;        boolean d = ( ary2 == ‘1’  ) ;        boolean e = ( ary2 == ‘2’  ) ;        boolean f = ( ary3 == ‘1’  ) ;        boolean g = ( ary3 == ‘2’  ) ;        boolean h = ( yearnum <= 2017 && yearnum >= 2010 ) ;               if( (a == true || b == true || c == true) && (d == true || e == true )             && (f == true || g == true ) && h == true )          System.out.println(“The student is in the department of ” + dept + “.

” +                             gender + ” entered the school in ” + term + ” ” + yearnum ) ;        else          System.out.println(“The student ID is incorrect.”) ;      }       else if(ary0 == ‘0’ )        break ;      else        System.out.println(“The student ID is incorrect.”) ;    }           System.out.println(“Good Bye!”) ;  }}

Best services for writing your paper according to Trustpilot

Premium Partner
From $18.00 per page
4,8 / 5
4,80
Writers Experience
4,80
Delivery
4,90
Support
4,70
Price
Recommended Service
From $13.90 per page
4,6 / 5
4,70
Writers Experience
4,70
Delivery
4,60
Support
4,60
Price
From $20.00 per page
4,5 / 5
4,80
Writers Experience
4,50
Delivery
4,40
Support
4,10
Price
* All Partners were chosen among 50+ writing services by our Customer Satisfaction Team