“frob every method call”
class Library {
Hashtable books = new Hashtable(100);
}
public Book find(User u, String title) {
frob();
if(books.containsKey(title)) {
frob();
Book b = (Book)books.get(title);
if (b != null) {
frob();
if (b.getBorrower() == null)
{frob();
b.setBorrower(u);}
return b;
}
}
return null;
}
}
Previous slide
Next slide
Back to first slide
View graphic version