Inventory Checker
Project 2001                                    Peter Komisar


Here's a new project idea. The key difference between the Intro and Advanced version
will be whether or not it connects to a database. The JDBC connection is only required
for the advanced version. You can do this project or one of the others from previous semesters
or one of your own making. If you have done one of these in a previous Java course, you will
need to select a new project this term.

A company wants to pitch a well-known Canadian store, famous for selling tires, with a new
front end for their parts department. Currently their system is a text-based model. To find a
part for your auto they ask for the make, model and year of the car. Then parts are found
from lists that describe the different categories that cars are listed under (i.e suspension, engine,
drive train, electrical etc.).

The company has asked you to build this GUI using swing components. They also want you
to JDBC connectivity required to access a database. Any database you have access to will
serve for use with the prototype. 

One question that needs to be asked is how much information can you determine on the client
side before you make your query to the server which is providing the database access. Another
facet that needs to be considered is how you will organize your query based on selections made
on your graphical user interface. So that becomes the challenge How can we sculpt the query we
will make to our database using entries built into our GUI.

Menus, combo boxes,  pop-up menus and simple textfields are areas could all be used to cut
down or qualify the search before going to the database. One could also incorporate  JList or
JTable components. For storing data in the client GUI you might use an array of arrays or
a compound Vector to represent the generic categories. These containers would be  provided as
arguments to your GUI components.

Once, you have narrowed down the field, using the GUI, an SQL statement based on the
choices could be composed to make up the database query which would be issued by a
submit button. The results of the submit should be displayed in a text area or list somewhere
in the GUI.

An extra feature might be to include the image of the vehicle that has been selected. This would
affort the customer a way to confirm parts are being selected for the correct car.

Incidently, the contractor, doesn't really care if it's auto parts. Other types of part inventory
would be suitable for the prototype.


Following is an abstraction of the type of data one might need to built into the GUI. 

Car
Chrysler, Ford, GM

Year
1993, 1996, 1999

Models
Cars, MiniVans, Trucks

Part Category
engine, exhaust, electrical

Parts List
piston, valves, head gasket,
muffler, hangers, tailpipe
head lamp, battery, alternator.


This is an example of the path that might be displayed in the GUI at successive selection points.

                             _______________Make_____________
                                    |                                      |                                   |
                              Chrysler                          Ford                            GM
                                    |
                       ___  Year____
                      |             |              |
                 1993      1996       1999
                     |
         ___Model___
         |            |            |
     Car      Van     Pickup
                                  |
              ____Parts category__
             |                     |                  |
        engine       exhaust        electrical
                                                      |
                                   _______Parts_______
                                   |                    |                     |
                          head lamp      battery       alternator          // Time to collect info and build the SQL query