You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
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();
|
|
}
|
|
} |