Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. /**
  2. * TheLineRunner.java 9/26/2016
  3. *
  4. * @author - Daniel Lee
  5. * @author - Period 3
  6. * @author - Id 908531
  7. *
  8. * @author - I received help from (name)
  9. *
  10. */
  11.  
  12. import java.io.IOException;
  13. import java.io.File;
  14. import java.util.Scanner;
  15.  
  16. public class TheLineRunner
  17. {
  18. // Prints the lists of numbers and the largest number in each list
  19. public static void main( String[] args ) throws IOException
  20. {
  21. Scanner file = new Scanner(new File("line.dat"));
  22.  
  23. int size = file.nextInt();
  24.  
  25. file.nextLine();
  26.  
  27. for (int i = 0; i < size; i++)
  28. {
  29. String num = file.nextLine();
  30.  
  31. TheLine line = new TheLine(num);
  32.  
  33. System.out.println(line.toString());
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement