ADD file via upload

main
pm4c6ia2v 4 months ago
parent 491326a653
commit a078bfe649

@ -0,0 +1,35 @@
package com.student;
import com.student.controller.StudentController;
import com.student.model.StudentRepository;
import com.student.view.ConsoleStudentView;
import com.student.view.StudentView;
/**
*
*
*/
public class Main {
/**
*
* @param args
*/
public static void main(String[] args) {
// 创建模型层组件
StudentRepository repository = StudentRepository.getInstance();
// 创建视图层组件
StudentView view = new ConsoleStudentView();
// 创建控制器,连接模型和视图
StudentController controller = new StudentController(repository, view);
// 显示欢迎信息
view.displayMessage("==================================");
view.displayMessage(" 欢迎使用学生管理系统");
view.displayMessage("==================================");
// 启动控制器,开始处理用户交互
controller.start();
}
}
Loading…
Cancel
Save