src/Recipe.java
/**
     * Saves the recipe for the user to access in an easily accessible directory for them to read at a later date.
     */
Saves the recipe for the user to access in an easily accessible directory for them to read at a later date.
Saves the recipe for the user to access in an easily accessible directory for them to read at a later date .
public static synchronized void saveInDirectory() throws IOException {
        FileWriter fw = new FileWriter(file);
        BufferedWriter bw = new BufferedWriter(fw);
        bw.write("~ " + recipeName + " ~\r\n");
        bw.write("You will need:\r\n");
        for (int i = 0; i < Ingredients.size(); i++) {
            bw.write("- " + (Double.valueOf(Amounts.get(i))) + " " + Units.get(i) + " of " + Ingredients.get(i) + "\r\n");
        }
        bw.write("In order to make " + recipeName + " for " + people + " people.");
        bw.close(); 
    }
public static synchronized void saveInDirectory ( ) throws IOException { FileWriter fw = new FileWriter ( file ) ; BufferedWriter bw = new BufferedWriter ( fw ) ; bw . write ( "~ " + recipeName + " ~\r\n" ) ; bw . write ( "You will need:\r\n" ) ; for ( int i = 0 ; i < Ingredients . size ( ) ; i ++ ) { bw . write ( "- " + ( Double . valueOf ( Amounts . get ( i ) ) ) + " " + Units . get ( i ) + " of " + Ingredients . get ( i ) + "\r\n" ) ; } bw . write ( "In order to make " + recipeName + " for " + people + " people." ) ; bw . close ( ) ; }
Saves the recipe for the user to access in an easily accessible directory for them to read at a later date.
Saves the recipe for the user to access in an easily accessible directory for them to read at a later date .
//Closes the BufferedWriter input stream.
