Question: Write Java code that implements the MVC pattern for a parts collection (records). Each part is characterized by a part number, a short description, and

Write Java code that implements the MVC pattern for a parts collection (records). Each part is characterized by a part number, a short description, and a price. For each part, we need to be able to set the part parameters as well as read (return) them. These operations should be defined within the model part of the code. A view part of the code should be simply displaying the values related to a part. But there should be two different views defined: One where the listing of the part's attributes should be in a single line, and another where the attributes are vertically spaced so that each attribute and corresponding value is shown in successive new lines. Data modifications as well as invocation of views should be functions of the controller only. You should also write some (main) code to demonstrate the workings of the code which should set values for an item and display it in both view formats (first in a single line and then in line-by-line). This code however should use the controller functions to update data and views. You may do this on whatever IDE you like or an online one such as online-java.com or any other that suits you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
