Advertisement
Guest User

Untitled

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