Create the Service, Model, View, and Controller classes in separate files.
Move the Solution class's methods to the created classes in accordance with how MVC should work.
Create the required fields in the classes as needed.
Don't add any other methods of your own.
MVC - a simplified version
- 16
Locked
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Patrick Moreland
8 June 2020, 17:42
Seems to me that calling the Controller class function from the View class violates the principle of MVC where View and Controller don't communicate with each other. I think it would have made more sense to have the order of execution start in the Controller class where it passes a command to Model, which then retrieves data from Service and sends the data to View to be displayed.
+1
Guadalupe Gagnon
22 November 2019, 21:24
**hint** Create 'new' objects to call the correct methods.
0