16 lines
310 B
Java
16 lines
310 B
Java
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();
|
|
}
|
|
}
|
|
}
|