Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Project 20-1: Display Customer Invoices Report
- -------------------------------------------------
- Welcome to the Customer Invoices Report
- frankjones@yahoo.com 10504M 11/18/04 $99.00
- frankjones@yahoo.com 10501M 10/25/04 $59.50
- johnsmith@hotmail.com 10505M 11/18/04 $297.50
- johnsmith@hotmail.com 10500M 10/25/04 $495.00
- seagreen@levi.com 10502M 10/25/04 $99.00
- wendyk@warners.com 10503M 10/25/04 $112.00
- -------------------------------------------------
- Operation
- This application connects to a database and displays a list of all customers and their invoices. Each
- line in this report includes the customer’s email address, the invoice number, the invoice date, and the
- invoice total.
- Specifications
- Create a Derby database named MurachDB that contains the necessary data. To do that, you can Use
- the SQL script stored in the CreateMurachDB.sql file that’s stored in the
- \murach\java\project_starts\project_21-1 directory.
- Create a class named CustomerInvoiceApp that connects to the database, gets a forward-only, readonly
- result set that contains the required data, and prints the data in this result set to the console. The
- rows in the result set should be sorted by the EmailAddress column.
- Use a prepared statement to retrieve the data.
- Use spaces to align the customer data in columns on the console. To do that, you can create a utility
- class named StringUtils that has a method that adds the necessary spaces to a string to reach a
- specified length.
- If the application encounters any exceptions, it should print them to the console.
- When the application finishes, it should close the objects for the result set, the prepared statement,
- and the database connection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement