Assignment Instructions
Complete these steps for this assignment.
1.In the (database interface) placeOrder() method, a transaction composed of a series of statements will need to be executed. If at any time there is an error, all of the statements should be reverted. In order, the following SQL statements must be executed:
- Check that there is enough quantity of the product to be ordered. If not, raise an exception; otherwise, continue.
- Insert a record in the order table to include the customer ID and date of the order. The date should be todays date obtained from the operating system.
- Insert a record in the order_detail table to indicate the order ID, product ID, and quantity.
- Update the product table to deduct the number of items ordered.
2. If the transaction is successful, inform the user that the order has been placed. If there was an exception, inform the user of the issue.
3. While your application is running, take screen shots of both successful and unsuccessful orders, and a screen shot of the MySQL Workbench screen showing their insertion.
- Do not capture your entire desktopjust capture the individual screens.
- Paste all screen shots into a single MS Word document.
- Your name should appear at the top of the MS Word document.
- Name your document, following this pattern: LastName_Week8.docx.
4. Create a .zip file containing your CapestraApp project.
- Before zipping your project, right-click the project and “clean” it. This greatly reduces the file size and speeds up the program’s performance.
- Then close NetBeans.
5. Add the MS Word document with your screenshots to your .zip file.
6. Submit your cleaned CapestraApp project in an appropriately constructed and correctly named .zip file.
- Rename your .zip file following this pattern: LastName_Week8zip.