src/Recipe.java
/**
     * Saves the program locally for the program to read at next runtime.
     */
Saves the program locally for the program to read at next runtime.
Saves the program locally for the program to read at next runtime .
public static synchronized void saveLocally() throws IOException {
        FileWriter fw = new FileWriter(localFile);
        BufferedWriter bw = new BufferedWriter(fw);
        /* Local Save Structure:
         * - Recipe Name
         * - Ingredient one
         * 		- Ingredient one amount
         *		- Ingredient one unit
         * - People served
         */
        bw.write(recipeName + "\r\n");
        for (int i = 0; i < Ingredients.size(); i++) {
            bw.write(Ingredients.get(i) + "\r\n");
            bw.write(Double.valueOf(Amounts.get(i)) * people + "\r\n");
            bw.write(Units.get(i) + "\r\n");
        }
        bw.write("" + people);
        bw.close(); 
    }
public static synchronized void saveLocally ( ) throws IOException { FileWriter fw = new FileWriter ( localFile ) ; BufferedWriter bw = new BufferedWriter ( fw ) ; /* Local Save Structure:
         * - Recipe Name
         * - Ingredient one
         * 		- Ingredient one amount
         *		- Ingredient one unit
         * - People served
         */ bw . write ( recipeName + "\r\n" ) ; for ( int i = 0 ; i < Ingredients . size ( ) ; i ++ ) { bw . write ( Ingredients . get ( i ) + "\r\n" ) ; bw . write ( Double . valueOf ( Amounts . get ( i ) ) * people + "\r\n" ) ; bw . write ( Units . get ( i ) + "\r\n" ) ; } bw . write ( "" + people ) ; bw . close ( ) ; }
Saves the program locally for the program to read at next runtime.
Saves the program locally for the program to read at next runtime .
//Closes the BufferedWriter.
