Question: Figure 1 shows the MVC implementation for add to cart module of online shopping system. a) Complete the following code segment given for a Cart


Figure 1 shows the MVC implementation for add to cart module of online shopping system. a) Complete the following code segment given for a Cart JavaBean class to represent Model that includes data members and methods based on the following class diagram. The class should consist of private data members and public methods. public class Cart \{ private String sessionId; private String userId; private int productId; private float pricePerUnit; private int quantity; public Cart() \{ sessionId =; userId =; productId =; pricePerUnit =; quantity =; \} b) Given user interface for view (addToCart.jsp) that produce the following output and its code segment. Complete a doPost() method for AddProductServlet.java (9 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
