Academic Integrity: I completed this project without the assistance of others. I understand that cheating, helping others to cheat, or failing to report such actions is dishonest and wrong. Such acts could result in disciplinary action against me.
Project Submission:
When the TA runs your app, he will:
1
Run the scripts to CREATE the database structures
2
Run the INSERTS to load the data
3
Run your app
4
Run the DROP script to get rid of all of the data and structures
This project requires you to develop a three tiered application:
Backend / Database side / Java data layer
Controller
Front end / GUI
DATABASE SIDE
· mulch_db_create.sql
All tables, primary keys, foreign keys, and any other constraints
· mulch_db_inserts.sql
All inserts for data contained in the Mulch Order Data spreadsheet
· mulch_db_drop.sql
Delete all data and drop all tables.
APPLICATION SIDE
· Follow the directions on the course web site to set up the Java / JDBC / Oracle environment on your own local machine or on the GL machines.
· Write this application in good object oriented design fashion.
o Create a package named control that will contain classes that control execution of the application. Specifically:
· The main application class to instantiate the application
· Functionality for running all Phases 2 through 4
o Create a package named model
· All the base classes for needed for dispatch and delivery (e.g., truck, mulch, order, etc).
· You might consider creating specialized report classes for specific reports.
· Report classes should contain base classes that make up the report data
o Create a package named view that will contain classes that will format and display the output. Specifically:
· Classes to format and print the required output
o Create a package named data that will contain classes that access the database. Specifically:
· A Database class that will encapsulate all the generic JDBC functions of communicating with the database.
· See below
· A MulchDatabase class that inherits from Database. It that will translate between the result sets returned by JDBC into mulch objects and report objects
· Create a Database class in db that will encapsulate all the generic functions of working with the database.
o userLogin
o userPasswd
o url
o connection
o statement
o result set
o Primary constructor should take the following arguments
§ Oracle instance => a value of “gl” or “local”
· Set url attribute appropriately
§ userLogin for that instance of Oracle
§ userPasswd for that instance of Oracle
public void processError(SQLException ex) {
System.err.println("SQLException information");
while(ex!=null) {
System.err.println ("Error msg: " + ex.getMessage());
System.err.println ("SQLSTATE: " + ex.getSQLState());
System.err.println ("Error code: " + ex.getErrorCode());
ex.printStackTrace();
// For drivers that support chained exceptions
ex = ex.getNextException();
} // end while
System.exit(1);
} // end processError ()