系统实现代码
package com.imooc.proj_1;
import java.util.Scanner;
public class BookManagerEasy {
private static Scanner console = new Scanner(System.in);
public static void main(String[] args) {
String[] books = { "高数", "语文", "英语", "政治", "历史", "地理" };
while (true) {
System.out.println("输入命令:1按照名称查找图书 2按照序号查找图书");
String book;
try {
int command = inputCommand();
switch (command) {
case 1:
book = getBookByName(books);
System.out.println("book:" + book);
break;
case 2:
book = getBookByNumber(books);
System.out.println("book:&