login.java

来自「国外的数据结构与算法分析用书」· Java 代码 · 共 39 行

JAVA
39
字号
import Interfaces.LoginInterface;
import Controllers.SystemController;
import Sets.*;

/**	This is the root class for the registration system.  It 
	controlls the main execution loop where the user type is
	identified. */
public class Login
{
	LoginInterface loginInter;
	/**	Determine what type of person the user is and allow
		them to interact with the system via the controller */
	public Login()
	{
		System.out.println("\nThe registration system contains several preloaded data. It consists");
		System.out.println("professors, registrar, administrator, students, department, and courses.\n");
		System.out.println("Data for professors, registrar, and administrator:");
		Sets.StaffSet.displayNames();
		System.out.println("Data for students:");
		Sets.StudentSet.displayNames();
		System.out.println("Data for departmemts and courses:");
		Sets.DepartmentSet.displayNames();
		
		loginInter = new LoginInterface();
		int userType = -1;
		do
		{
			userType = loginInter.getUserType();
			SystemController sy = new SystemController();
			sy.initiate(userType, loginInter);
		} while (userType != 99);
	}
	public static void main(String args[])
	{
		new Login();
	}
} /* end of Login */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?