daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void summaryFile(String name1, String name2, int ID, double[] GPA, double TotalGPA, int semTaken, int[] semCode) {
  2.         System.out.println("Enter file name that you want to write in:");
  3.         Scanner keyboard = new Scanner(System.in);
  4.         String filename2 = keyboard.next();
  5.         try {
  6.             PrintWriter output = new PrintWriter(new FileOutputStream(filename2));
  7.         } catch (FileNotFoundException e) {
  8.             System.out.println("Error: File not found!");
  9.         }
  10.         output.println("Name: " + name1 + " " + name2);
  11.         System.out.println("ID: " + ID);
  12.         String standing;
  13.         for (int i = 0; i < semTaken; i++) {
  14.             System.out.println("Your GPA for term " + semCode[i] + " is: " + GPA[i] + "And your status is"
  15.                     + checkStanding(GPA[i]));
  16.         }
  17.         System.out.println("Your total GPA is: " + TotalGPA);
  18.     }
RAW Paste Data
Top