Professional Documents
Culture Documents
LA-2
Submitted as a component of LA 2 for the subject of
IN
BY
1 | Page
1. Question - Student Registration flow MVC
● STRUCTURE
2 | Page
● CLASS DIAGRAM
3 | Page
● MODEL - Student.java
return rollNo;
this.rollNo = rollNo;
return name;
this.name = name;
return class;
4 | Page
}
this.class = class;
return section;
this.section = section;
5 | Page
● VIEW - StudentView.java
6 | Page
● CONTROLLER - StudentController.java
this.model = model;
this.view = view;
model.setName(name);
return model.getName();
model.setRollNo(rollNo);
return model.getRollNo();
7 | Page
public void setStudentClass(String class){
model.setClass(class);
return model.getClass();
model.setSection(section);
return model.getSection();
view.printStudentDetails(model.getName(), model.getRollNo(),
model.getClass(), model.getSection());
8 | Page
● MVC Design Pattern - MVCpattern.java
controller.setStudentName(name);
controller.setStudentRollNo(rollNo);
controller.setStudentClass(class);
controller.setStudentSection(section);
9 | Page
controller.updateView();
student.setName("");
student.setRollNo("");
student.setClass("");
student.setSection("");
return student;
10 | Page
● OUTPUT :-
New Student:
Name: Alok
Roll No: 1
Class: 7
Section: A
Roll No: 20
11 | Page