Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String id = "";
- String fn = "";
- String ln = "";
- String pay = "";
- String crs = "";
- String enr[] = new String[4];
- int i = 0;
- String enrol[] = new String[4];
- Scanner console = new Scanner(System.in);
- FileWriter fw = new FileWriter("StudentID", true);
- System.out.print("Please enter a Student ID: ");
- id = console.next();
- System.out.print("Please enter payment. Y or N: ");
- pay = console.next();
- System.out.print("Please enter First Name: ");
- fn = console.next();
- System.out.print("Please enter Surname: ");
- ln = console.next();
- System.out.print("Please enter Program number: ");
- crs = console.next();
- for(i = 0; i < enr.length; i ++)
- {
- System.out.print("Please enter Course codes: ");
- enr[i] = console.next();
- }
- System.out.print("Continue. Y/N: ");
- while(console.next().charAt(0) == 'Y');
- ArrayList<Student> ai = new ArrayList<Student>();
- ai.add(new Student(id,pay,fn,ln,crs,enr[i]));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement