Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1.         String myTempArray[];
  2.         //reading all the lines in the input file
  3.         while (input.hasNext()) {
  4.           //storeing each line of the input file in the variable LINE.(changes with each iteration)
  5.           line = input.nextLine();
  6.           myTempArray = line.Split(" ");
  7.           if (lineCounter == 0) {
  8.             _setNumberOfCourses(line);
  9.           } else if (lineCounter == 1) {
  10.             _SetNumberOfStudents(line);
  11.           } else if ( myTempArray[0].equals("Add_Course") ) {
  12.             _addCourse( myTempArray );
  13.           } else if ( myTempArray[0].equals("Add_ExamType") ) {
  14.             _addExamType( myTempArray );
  15.             //ETC. Continue like so
  16.           } else {
  17.             _addMarks( myTempArray );
  18.           }
  19.  
  20.            
  21.             //System.out.println(line);
  22.             lineCounter++;
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement