April 2019
Intermediate to advanced
360 pages
9h 17m
English
The BookController class is presented next in three sections. The first section contains two private class variables: model and view. The constructor method is also provided:
public class BookController { private Book model; private BookView view; // constructor public BookController(Book model, BookView view) { this.model = model; this.view = view; }
The second section of the BookController class consists of three accessor methods and three mutator methods:
// accessor methodspublic String getBookTitle() { return model.getTitle();}public String getBookISBN() { return model.getISBN();}public int getBookYear() { return model.getYear();}// mutator methodspublic void setBookTitle(String title) { model.setTitle(title); ...
Read now
Unlock full access