final project q9

This commit is contained in:
2022-05-24 23:41:21 +08:00
parent 3dc6689804
commit 16eacad6a1
17 changed files with 611 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
public class ControllerGetBook extends Controller {
public ControllerGetBook(Library m) {
super(m);
}
// get book
public String getBook(String name) {
try {
return Integer.toString(m.getBook(name));
} catch (UnknownUserException e) {
// return error message
return e.getMessage();
}
}
}