@@ -0,0 +1,1226 @@
+import java.io.*;%0Aimport java.util.Scanner;%0A%0Apublic class FileSerial%7B%0A%09%0A%09public void exportGame(Player p)%7B%0A%09%09try%7B%0A%09%09%09ObjectOutputStream so = new ObjectOutputStream(new FileOutputStream(%22.%5C%5Cserial%5C%5C%22 + p.getName() + %22.dat%22));%0A%09%09%09so.writeObject(p);%0A%09%09%09so.flush();%0A%09%09%09so.close();%0A%09%09%7D catch (Exception e)%7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09System.out.printf(%22Character file exported as: %25s.dat! %25n%22, p.getName());%0A%09%7D%0A%09%0A%09public Player importGame()%7B%0A%09%09Player temp = null;%0A%09%09Scanner console = new Scanner(System.in);%0A%09%09File test;%0A%09%09String name;%0A%0A%09%09do %7B%09%09%0A%09%09%09System.out.print(%22Enter the name of the character you wish to import: %22);%0A%09%09%09name = console.nextLine();%0A%09%09%09System.out.println();%0A%09%09%09test = new File(%22.%5C%5Cserial%5C%5C%22 + name + %22.dat%22);%0A%09%09%0A%09%09%09if (test.exists() == false)%0A%09%09%09%09System.out.println(%22Error: specified character's game file does not exist!%22);%0A%09%09%7D while (!test.exists()); // Repeats until valid file name is obtained.%0A%0A%09%09try %7B%0A%09%09%09ObjectInputStream in = new ObjectInputStream(new FileInputStream(%22.%5C%5Cserial%5C%5C%22 + name + %22.dat%22));%0A%09%09%09temp = (Player)in.readObject();%0A%09%09%09in.close();%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09System.out.printf(%22Character file (%25s.dat) was imported!%25n%22, name);%0A%09%09return temp;%09%09%0A%09%7D%0A%7D%0A%09%09%0A

Create FileSerial.java