标签:
import 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); } } } }
标签:
原文地址:http://www.cnblogs.com/ycy1025/p/5374286.html