package library;
import java.util.Scanner;
import java.io.IOException;
import java.util.Scanner;
import com.edu.dao.impl.UserDaoImpl;
import com.edu.domain.User;
public class test {
public static void main(String[] args) throws IOException {
while (true) { //缺少一个大括号,后续需要补充
Scanner sc = new Scanner(
System.in);
System.out.println("+------------------------------------------------------------+");
System.out.println(" 欢迎使用图书管理系统!");
System.out.println("+------------------------------------------------------------+");
System.out.println(">>开始菜单");
System.out.println("");
System.out.println(" 1.查询图书");
System.out.println(" 2.登录系统");
System.out.println(" 3.退出系统");
System.out.println("");
System.out.println("+------------------------------------------------------------+");
System.out.println("请输入选项前的数字选择功能");
String choice = sc.nextLine();
UserDaoImpl udi = new UserDaoImpl();
//int i = 0;
//Scanner r = new Scanner(
System.in);
//i=r.nextInt();
switch( choice ){
case "1" :
System.out.println(1);
break;
case "2" :
System.out.println("+------------------------------------------------------------+");
System.out.println("");
System.out.println(" 1.用户登录");
System.out.println(" 2.管理员登录");
System.out.println(" 3.退出系统");
System.out.println("");
System.out.println("+------------------------------------------------------------+");
System.out.println("请输入选项前的数字选择功能");
int u = 0;
Scanner o = new Scanner(
System.in);
u=o.nextInt();
switch( u ){
case 1 :
System.out.println("");
System.out.println("登录功能未实现,默认登录成功");
System.out.println("");
System.out.println("+------------------------------------------------------------+");
System.out.println("");
System.out.println(" 1.借书");
System.out.println(" 2.还书");
System.out.println(" 3.退出系统");
System.out.println("");
System.out.println("+------------------------------------------------------------+");
System.out.println("请输入选项前的数字选择功能");
int num = 0;
Scanner man = new Scanner(
System.in);
num=man.nextInt();
switch( num ){
case 1 :
break;
case 2:
huanshu s = new huanshu();
}
case 2:
System.out.println("");
System.out.println("登录功能未实现,默认登录成功");
System.out.println("");
System.out.println("+------------------------------------------------------------+");
System.out.println("");
System.out.println(" 1.添加书籍");
System.out.println(" 2.删除书籍");
System.out.println(" 3.退出系统");
System.out.println("");
System.out.println("+------------------------------------------------------------+");
System.out.println("请输入选项前的数字选择功能");
case 3:
System.exit(0);
break;
}
break;
case "3" :
System.exit(0);
break;
default :
}
}
}
}
@
LeeSeoung 这是我的代码,其他的输入的包都跟我网址上给的一模一样,为了版面就不再贴了