Your assignment for this Afternoon is: Step #2 in Thinking in OO (AnalysisAndDesign.txt) 2) break the appl into "parts" (How many classes do we create?) which parts handle the Business Rules? which parts handle the SQL? which part talk to the User? we are going to do a "Sample" appl together On the Web site is BookSchema.txt which has 3 DB Tables we are going to "design" the parts for this appl I need a Web Appl to Loan Books to Library Users Here are the requirements Each User must have a account at the Library Each User can borrow at most 3 books at a time If a User has an Overdue book, they cannot borrow another one I need a web page "Sign On" search for a Book check-out a Book check-in a book --------------------------------------------------------- How do I break this appl into "parts"? Task I - Talk to the User I will need code (classes) to do: here is where I list all the web pages for the appl signon page signoff page search for book by title page search for book by author page (I get back a list of books for the User to pick from) etc. Task II - Host the Business Logic I will need code (classes) to do: here is where I list all the Entity classes (sets of data) User Entity (set of data fields) Book Entity Loan Entity Task III - Access services (external software) I need code (classes) to read/write files/DBs/etc here is where I list all the Action interfaces/classes (work routines) UserDAO (Data Access Object, where I put the SQL) BookDAO LoanDAO I will also have Utility code (shared routines) for example custom error handlers, or logger ???? ----------------------------------------------------------- Action Classes I think I need 3 DB Action classes (Data Access Objects - DAO) 1) Handle all the SQL for Users here I list the routines for example: findUserByName findUserById findAllUsers etc. 2) Handle all the SQL for Books findByTitle findByISBN findByAuthor findOverDueBooksByUser 3) Handle all the SQL for Loans checkOutBook checkInBook Entity Classes I think I have 3 sets of data 1) User here is where I list the fields and the rules USERID NUMBER(10) NOT NULL, the userId must greater than zero and less than 10,000,000,000 min = 1 max 9999999999 initial value = 1 ADDRESS VARCHAR2(40) NOT NULL, the address must not be null, or empty (all spaces) min = 1 char max = 40 char initial value = "Unknown" ADDRESS_ZIP VARCHAR2(10) NOT NULL, the zip must not be null, or empty (all spaces) min = 00001 max = 99999-9999 pattern 99999-9999 pattern 99999-9999 ^^^^^ required ^^^^^ optional initial value = 00001 2) Book 3) Loan Web pages I think I need a Web page for: login/logout find Book by title check out Book (new Loan record) list my current checked out Books? --------------------------------------------------------------- You Assignment starts here: Is to go thru the ProjectOverview and list: For Customer Appl all the Action classes (DB access or File accces) all the Entity classes (DB records, set of data being passed aound the system, etc) list: the class name for each field in the class list: the field name the data type the initial value the business rules: min max required? any other constraint? a start of all the Web Pages (list them by name) For the World Appl all the Action classes all the Entity classes a start of all REST API calls (list them by name)