import java.io.*;
import javax.swing.JOptionPane;

/**
 * CS-12J Asn 10
 * Store.java
 * Purpose: models a store.
 *
 * @author Ed Parrish
 * @version 1.1  11/03/04
 */
public class Store {
    public static final int LINES_PER_PRODUCT = 3;

    private Product[] prods;
    private String fileName;

    /**
     * Constructs a Store.
     *
     * @throws IOException  If an input exception occurs.
     */
    Store() throws IOException {
        fileName = "products.txt";
        loadProducts();
    }

    /**
     * Load the product information from the fileName into prods[].
     *
     * @throws IOException  If an input exception occurs.
     */
    public void loadProducts() throws IOException {

    }

    /**
     * Gets a valid product selection from the user.
     *
     * @return The index in the array of the product selected.
     */
    public int chooseProduct() {
        int choice = 0;
        return choice;
    }

    /**
     * Records the sale of a Product by decrementing the inventory.
     *
     * @param item The index in the array of the Product sold.
     */
    public void sellProduct(int item) {

    }

    /**
     * The main method for the NumberConverterApp program.
     *
     * @param args Not used
     * @throws IOException  If an input exception occurs.
     */
    public static void main(String[] args) throws IOException {
        Store store = new Store();
        int choice = 1;

        while (choice != 0) {
            choice = store.chooseProduct();
            store.sellProduct(choice);
        }

        System.out.println("Goodbye!");
        System.exit(0);
    }
}

