final project q12 giveup

This commit is contained in:
2022-05-24 23:53:18 +08:00
parent 252d0c67bb
commit 88a587102f
22 changed files with 784 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
public class ControllerMoreBook extends Controller {
// constr
public ControllerMoreBook(Library m) {
super(m);
}
/**
* @param name the username
* @param number the book number
*/
public String moreBook(String name, String number) {
try {
int num = Integer.parseInt(number);
m.moreBook(name, num);
return "";
} catch (UnknownUserException e) {
return e.getMessage();
} catch (NotALenderException e) {
return e.getMessage();
} catch (NumberFormatException e) {
return e.getMessage();
}
}
}