Hi what i want to do is modify a program that i have done that loads a database from a .dat file to now read from an sql database.
I have a number of classes that allow me to load from the .dat file. The items are sperated by '_'.
my question is where should i start, and would i have to make major changes to all my classes or just a few. Currently i have a GUI that allows a user to click a selected item in a jlist once they have clicked the item a panel next to the jlist displays the details of the item selected. Any help much thanked.
A break down of the necessary classes:
/**
*Load the information of a {@link Catalog} object from a file:
public class FileCatalogLoader implements CatalogLoader
/**
*This interface declares a method for obtaining a products catalog
/*
* Loads the product catalog with the data in the specified file.
*
* @param filename The name of a file that contains catalog information.
* @return the product catalog.
* @throws FileNotFoundException if the specified file does not exist.
* @throws IOException if there is an error reading the
* information in the specified file.
* @throws DataFormatException if the file contains
* badly-formed data.
public interface CatalogLoader {
/**
* This class models a product catalog. It contains a collection of {@link Product} objects.
public class Catalog {
/**
* This class models a product
* It contains the following information:
*
*
the code of the product, a String
*
a short description of the product, a String
*
the price of the product, a double
*
*
public class Product {
I have a number of classes that allow me to load from the .dat file. The items are sperated by '_'.
my question is where should i start, and would i have to make major changes to all my classes or just a few. Currently i have a GUI that allows a user to click a selected item in a jlist once they have clicked the item a panel next to the jlist displays the details of the item selected. Any help much thanked.
A break down of the necessary classes:
/**
*Load the information of a {@link Catalog} object from a file:
public class FileCatalogLoader implements CatalogLoader
/**
*This interface declares a method for obtaining a products catalog
/*
* Loads the product catalog with the data in the specified file.
*
* @param filename The name of a file that contains catalog information.
* @return the product catalog.
* @throws FileNotFoundException if the specified file does not exist.
* @throws IOException if there is an error reading the
* information in the specified file.
* @throws DataFormatException if the file contains
* badly-formed data.
public interface CatalogLoader {
/**
* This class models a product catalog. It contains a collection of {@link Product} objects.
public class Catalog {
/**
* This class models a product
* It contains the following information:
*
*
the code of the product, a String
*
a short description of the product, a String
*
the price of the product, a double
*
*
public class Product {