第二次数据库作业--Main
时间:2021-07-01 10:21:17
帮助过:2人阅读
dao.CourseDao;
import model.Course;
import view.C2SView;
import view.CourseView;
import view.StudentView;
import java.sql.SQLException;
import java.util.List;
import java.util.Scanner;
/**
* Created by yinus
* Date:2016/4/8
* Time:16:09
*/
public class Main {
private static final String PROMPT="Main[S/C/C2S/E]>"
;
private static final String menu="" +
"[S]STUDENT\n" +
"[C]COURSE\n" +
"[C2S]COURSE2STUDENT\n" +
"[E]EXIT\n" +
PROMPT;
public static void main(String[] args)
throws SQLException,NullPointerException {
System.out.print(menu);
Scanner in =
new Scanner(System.in);
while (in.hasNext()){String keyWord =
in.next();
if (keyWord.equals("E"
)){
return;
}
else if (keyWord.equals("S"
)){
StudentView.view();
System.out.print(PROMPT);
}
else if (keyWord.equals("C"
)){
CourseView.view();
System.out.print(PROMPT);
}
else if (keyWord.equals("C2S"
)){
C2SView.view();
System.out.print(PROMPT);
}
}
}
}
第二次数据库作业--Main
标签: