package lab11;

import java.io.FileNotFoundException;
import java.util.ArrayList;

/**
 * CS 159 Lab 11: Spring Cleaning.
 *
 * @author
 * @version
 */
public class SpringCleaning {

    /**
     * Parses the string argument as an Integer, Double, or BigInteger,
     * whichever type is most appropriate to store the number value.
     *
     * @param str text representation of the number to parse
     * @return appropriate object that represents the number
     * @throws NumberFormatException if the string is not a number
     */
    public static Number parseNumber(String str) {
        return null;
    }

    /**
     * Reads a file and returns all numbers found in it. (Hint: Call the
     * parseNumber method on every "word" in the file.)
     *
     * @param filename name of the file to read
     * @return list of all the numbers in the file
     * @throws FileNotFoundException if the filename is invalid
     */
    public static ArrayList<Number> extractAll(String filename)
            throws FileNotFoundException {
        return null;
    }

    /**
     * Writes the given list to a file, one number per line. All numbers are
     * formatted with comma separators. Floating-point numbers are formatted
     * with two decimal places.
     *
     * @param numbers list of numbers to format
     * @param filename name of the file to write
     * @throws FileNotFoundException if the filename is invalid
     */
    public static void formatAll(ArrayList<Number> numbers, String filename)
            throws FileNotFoundException {
    }

}
