Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1.    
  2.             String id = "";
  3.             String fn = "";
  4.             String ln = "";
  5.             String pay = "";
  6.             String crs = "";
  7.             String enr[] = new String[4];          
  8.                int i = 0;
  9.                String enrol[] = new String[4];
  10.                Scanner console = new Scanner(System.in);
  11.                FileWriter fw = new FileWriter("StudentID", true);
  12.                
  13.                System.out.print("Please enter a Student ID: ");
  14.                id = console.next();
  15.                System.out.print("Please enter payment. Y or N: ");
  16.                pay = console.next();
  17.                System.out.print("Please enter First Name: ");
  18.                fn = console.next();
  19.                System.out.print("Please enter Surname: ");
  20.                ln = console.next();
  21.                System.out.print("Please enter Program number: ");
  22.                crs = console.next();
  23.              
  24.                for(i = 0; i < enr.length; i ++)
  25.                {
  26.                    System.out.print("Please enter Course codes: ");
  27.                    enr[i] = console.next();
  28.                }
  29.                System.out.print("Continue. Y/N: ");
  30.                
  31.                while(console.next().charAt(0) == 'Y');
  32.                 ArrayList<Student> ai = new ArrayList<Student>();
  33.              ai.add(new Student(id,pay,fn,ln,crs,enr[i]));
  34.        }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement