Objectives:
1. Practice using TDD.
2. Practice building methods.
3. Practice using Java/JUnit.
Introduction:
This task is to use test-driven development (TDD) to finish the BookCollection project. You should have at least four classes: Book class, BookCollection class, TestBook class and TestBookCollection class. You need to use TDD to test and build all the methods
including:
1) A searchByYear(int year) method that returns all Books published in the given year. Your test-method should check for the years 1981, and 1999.
2) A searchByTitlePhrase(String phrase) method that returns all Books with phrase anywhere in their title.
3) A searchByAuthorName(String name) method that returns all Books published by the same author.
4) Necessary methods in Book class
You should use test-driven development for these methods:
1. Create test-methods for each of these operations, and then
2. Write the methods to pass the tests.
A significant portion of your score will be based on the effectiveness and thoroughness of your test-methods.
Grading
1. Test methods (test cases): 60%
2. Methods for the classes: 40%
Submission:
Run all you tests (which are passed) and paste the result into the end of your source code (save as a word file). Upload your word file on CMS.