Description
The purpose of this assignment is to continue with our design modeling of the ITOT Case Study. For the Manage Shopping Cart use case, you will create a test scenario, and two test cases. You will also add a persistent UML class diagram and SQL statements for ShoppingCart and ShoppingCartItem (these will be provided). Finally, you will map your domain classes ShoppingCart and ShoppingCartItem to Java statements.
Course Objective(s)
CO7: Describe implementation modeling for databases and programming style
CO9: Apply your knowledge of object oriented and UML concepts by designing and developing UML models
You will create two test cases following the format described in your design specification. In testing, test cases are developed first and then tested later by a different team. You will not be able to exercise your test cases (so you won’t have Actual Results) but you can create the test case.
You will also create SQL statements including constraints for ShoppingCart and ShoppingCartItem. You will also create sample Java statements for ShoppingCart and ShoppingCartItem design classes.
In this assignment you complete the following sections in your Design Specification
Sections 6 (test cases), Section 7 (SQL), and Section 8 (Java)
Instructions
1. Review the Quick Resources listed at the end of this assignment.
2. Complete the following
Section 6.1
You will identify and document two test scenarios (e.g., “Add a product to cart.”) based on the Manage Shopping Cart use case and complete. Describe the test scenarios (around 100 words) at a high level.
Section 6.2 – Test Case 1
You will create and discuss an additional scenario for Manage Shopping Cart including test Case Name, Description, Prerequisites, Steps, Input, Expected Result, Actual Result, Status. The steps of the test case must be numbered! Example:
Test Scenario: <add your test scenario here for Manage Shopping Cart>
Test Case ID
Test Case Description
Test Case Steps
Expected Results
Actual Results
Test Case Status
TC001
<add description?
1. <add step>
<add expected result>
<add actual result>
<add status pass/fail>
2, <add step>
…
…
…
…
…
…
TC002
<add description?
1. <add step>
<add expected result>
<add actual result>
<add status pass/fail>
2, <add step>
…
…
…
…
…
…
Section 6.3 – Test Case 2
You will create Test Case 2 based on your scenario for Manage Shopping Cart and add it in the table format in Section 6.3 of your design specification.
Section 7
An entity (persistent) classes will most likely become tables in a relational database. In database design, we would follow normalization and functional decomposition guidelines to normalize our entities (classes) into valid relations. Then we would create SQL (Structured Query Language) statements to create the tables and add constraints. After that, we could populate our tables with data. We will assume our classes are normalized for this exercise.
Persistent Class Diagram
An example of a persistent class diagram is below. You can copy these into Section 7 and 7.1 in your document.
7.1 Persistent Data Model
7.1.2 Persistent Data Model Discussion
The persistent model utilizes four tables, UserAccount, Payment, ShoppingCat, and ShoppingCartItem. The ShoppingCart table represents the shopping cart itself, and includes a primary key cart_id, a foreign key user_id column to identify the user associated with the cart, and a created_at column to store the timestamp when the cart was created.
Section 7.2 – SQL Statements for ShoppingCart and ShoppingCartItem
You will use two classes (ShoppingCart and ShoppingCartItem) and create the SQL statements to implement the tables and constraints. You will need to include primary key and foreign key constraints. Add the SQL Statements to Section 7.2 of your design specification.
Section 7.2.1 – Discussion
Include a discussion of your SQL statements in Section 7.2.1 in your design specification (50 to 100 words).
Section 8 – Java
Add the following to Section 8. This section shows how the implementation of the code will look using Java programming language.
Section 8.1 – Java for ShoppingCart and ShoppingCartItem
Using Chapter 18 examples in your textbook or your resources below, create Java statements for ShoppingCart and ShoppingCartItem detailed design classes. Note that ShoppingCart and ShoppingCartItem have a composition type of part whole relationship. See the Engine and Piston example at https://coderanch.com/t/443002/java/Java-Coding-UML-Aggregation-Composition. Add them to Section 8.1 of your design specification and complete Section 8.
Section 8.2 – Java Discussion.
Include a discussion of your Java statements in Section 8.2 in your design specification (50 to 100 words).