Question: in this exercise, you are going to practice the MVC design pattern. You are provided a program that simulates a shopping cart. Your task is
in this exercise, you are going to practice the MVC design pattern.
You are provided a program that simulates a shopping cart.
Your task is to rewrite this program so that it is implemented with the MVC model view
controller pattern.
Your program should contain at least four classes:
A view class that can display the shopping cart interface to user; it can also set data to the
textbox;
A model class that simulates the internal behavior of a shopping cart, the number of items in
the shopping cart should be maintained by the model class.
A controller class that connects view and model. It can interpret the action performed by the
user and call methods of view or controller to perform specific operations.
An application class that can contains the main function to test this program.
Submissions:
Upload all source code files java files
Upload screenshots of the output of running your program showing
a Empty shopping cart
b One item is added to the shopping cart
c Two items are added to the shopping cart
d One item is removed from the shopping cart
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
