final project q12 giveup
This commit is contained in:
15
finalproject/Question12/ControllerGetBook.java
Normal file
15
finalproject/Question12/ControllerGetBook.java
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user