Powered by Blogger.

Model–View–Controller (MVC) Design Patterns

No comments :
It is defined as follows
  • Models: Models are object used as blueprints for all of the objects that will be used in the application. 
  • Views: views are used to represent the presentational aspect of the information and data located in the models. 
  • Controller: controller are act as both of the models as well as views. They serve as a connection between the models and views.
Example: we are going to use MVC design Pattern to set and print the data of the collage Collages.
Step 1. Create Model.
Collage.java

Step 2. Create View.
CollageView.java

Step 3. Create Controller.
CollageController.java

Step 4. Use the CollageController methods to demonstrate MVC design pattern usage.
MVCPatternDemo.java

Step 5: Verify the output.
 Collage: 
 Name: ABCD 
 Roll No: 20 
 Collage: 
 Name: Manoj 
 Roll No: 20

No comments :

Post a Comment

Please Write a Message for Programming or something Related issues.