public void createApp() throws IOException
{
    int cNum = numOfApps;
                    Scanner in = new Scanner(System.in);                   
                    System.out.println("What is the App's name?");
                    String n = in.nextLine();
                    System.out.println("What is the App's description?");
                    String a = in.nextLine();
                    System.out.println("What is the Developer name?");
                    String p = in.nextLine();
                    System.out.println("What is the App's cost? (GBP)");
                    String c = in.nextLine();
                    double pt = (int)(Math.random()*10000);
                    String pop = Double.toString(pt);
                    System.out.println("What is the type of the App?");
                    String t = in.nextLine();
                    System.out.println("Is the App for free or for purchasing? Type 1 for Free and 2 for Purchasing");
                    int ifp = in.nextInt();
                    String iff;
                    if(ifp==1){iff="Free";}
                    else {iff="Purchasing";}
                    
                    File f = new File(appDir+cNum);
                    do { cNum ++;} while(f.exists());
                    writeToFile(cNum, n, "app");
                    writeToFile(cNum, a, "app");
                    writeToFile(cNum, p, "app");
                    writeToFile(cNum, c, "app");
                    writeToFile(cNum, pop, "app");
                    writeToFile(cNum, t, "app");
                    writeToFile(cNum, iff, "app");
                    System.out.println("Your App has been created with the number "+cNum+".");
                    System.out.println("-----------------------");
                    numOfApps++;
                    appMng();
                    }