Question
Create a shopping cart application The application must do the following: List products for sale User can add products to a shopping cart (We can
Create a shopping cart application
The application must do the following:
List products for sale
User can add products to a shopping cart (We can hardcode the user, no need for Spring Security)
A User can update quantities of a particular object in their shopping cart
A User can checkout (which will turn a shopping cart into an order and associated order items).
A user can view their shopping cart
A user can view previous orders
A user can view a particular order and see its order items.
An Admin can add products (since there is no actual security, simply put admin functions behind the /admin url. An example might be /admin/products/new).
An Admin can delete products
An admin can update products
An admin canadd product tvpes
An admin can view all orders in the system.
Main Data Types
create table countries (
id int auto increment primary key, name varchar (60));
create table users (
id bigint auto increment primary key, first name varchar (60) last name varchar (60) , username varchar (60) , email varchar (80), password varchar (20) , country_ id bigint);
create table product types (
id bigint auto increment primary key, type name varchar (40));
create table products (
id bigint auto increment primary key,
sku varchar (30), name varchar (60) ,
description varchar (255), product_type _id bigint, price numeric);
create table shopping cart (
id bigint auto increment primary key, product id bigint, quantity int, customer id bigint);
create table orders (
id bigint auto increment primary key, order date datetime,
credit card last four varchar (4), customer id bigint, order amount numeric, tax numeric, shipping numeric);
create table order items (
id bigint auto increment primary key order id bigint, product id bigint, quantity int, price numeric);
Notes
Use the H2 in Memory Database. Go ahead and pre-populate some of the database tables like Users, Products, Product Types, old Orders and associated order items.
Use a simple web interface with either Thymeleaf or JSPs. It doesn't have to be fancy or use sophisticated JavaScript.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started