📄 login.java
字号:
import Commands.LoginCheck;
import Commands.InterfaceBuilder;
import Interfaces.*;
import Sets.*;
/** Initiate interactions with a sequence of logins. */
public class Login
{
/** Input a sequence of login requests. For each one, call a method to verify the person
logging in has authorization, obtain an appropriate interface for the person, and then
create and initiate a controller to handle the interaction with this person. */
public static void main(String[ ] args)
{
System.out.println("The bank system contains several preloaded data. It consists");
System.out.println("teller, administrator, customers and their account information.\n");
System.out.println("Data for the tellers and administrator:");
StaffSetAccess.displayStaff();
System.out.println("Data for the customers:");
CustomerSetAccess.displayCustomer();
System.out.println("Data for the accounts:");
AccountSetAccess.displayAccount();
Interface loginInterface = new Interface(); // obtain a generic interface for logging in
int id = loginInterface.getLoginID(); // obtain the id of the user
while (id != 0)
{
if (LoginCheck.valid(id, loginInterface))
{
StaffInterface userInterface = InterfaceBuilder.get(id);
Controller controller = new Controller();
controller.initiate(userInterface);
}
id = loginInterface.getLoginID(); // obtain the id of the next user
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -