cosc3506assigment Solution

COSC3506: Individual Assignment
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:
 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.
 a searchByTitlePhrase(String phrase) method that returns all Books with phrase anywhere in their title.
 a searchByAuthorName(String name) method that returns all Books published by the same author.
 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.
1. Test methods (test cases): 60% 2. Methods for the classes: 40%
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.
Powered by