ITEC 340
Homework 4
Spring 2005
Homework
4 continues the use of the Nascar Schema:
Use
Java and JDBC to construct an application which prompts the user to enter the
name of a race. The system should respond
with the Message “There is no race with that name.” if the race cannot
be found. If the race does exist the
system should respond with the race name, venue, and number of lead changes
followed by a complete listing of the race results in an appropriate order.
Your
application should include a race class, a result class, an
ResultsInterface class, and an H4 class to act as the
driver. The ResultsInterface
class and the H4 class should NOT contain any JDBC and should not have to
handle any SQLexceptions. The race class should have a constructor
that has the race name as the only parameter.
Your constructor will then make the JDBC connection and perform the
queries necessary to retrieve race attributes including a collection of race
results. The race class will need getter
methods for the race name, venue name, and number of lead change
attributes. The Results class should
also have a method or methods to retrieve the results.
Your
interface does not have to be a GUI but can be a GUI if you wish. Sometimes it is helpful to build an
application in steps. A good first step
would be to create the above application with just the race name, venue, and
lead changes being returned. When that runs successfully you can add the race results requirement.
Create
a folder named RU04 in your submissions folder on Neelix. Place your .java files in that folder by 5 PM Friday, February
18th. DO NOT submit the Oracle JDBC driver
folder. Dr. Carter and Dr. Phillips
both have that folder on their test environment. We do not need 40 copies of the Oracle JDBC
client to be submitted.