Kurssiesittely | Luennot | Harjoitukset |
---|
See the instructions in the first exercise.
The goal of this project work is to make a graphical addressbook where contacts can be added (name, address, phone number, email) and the contacts can be searched based on all fields. The program is meant to be written from scratch. You may use this empty Maven project as a template.
The complete program will be something like shown below. The contacts in the addressbook are shown in an in-place editable table and when something is typed into the search field, the contact list is filtered on every key press so that the search results are shown in the list.
max 7 points
Mock objects can be used for example by implementing the removing of rows so that when a row is removed, the system will call a method on an interface which listens for the removal of rows. The interface could be something like this:
public interface RowRemovalListener { void onRowsRemoved(int rowCount); }
You will need to add the dependency to the EasyMock library into the Tetris project's pom.xml file, because it was not yet there at the beginning of this course. This can be done by adding the following rows into the file's <dependencies> block. You may have to regenerate your IDE's project files.
<dependency> <groupId>org.easymock</groupId> <artifactId>easymock</artifactId> <version>2.5.2</version> <scope>test</scope> </dependency>
1 point: Removing full rows has been implemented in Tetris using TDD. All tests pass.
2 points: Removing full rows and counting the score has been implemented in Tetris using TDD. All tests pass.
+1 extra point: The EasyMock library has been used in the tests.
+1 extra point: The Mockito library has been used in the tests.
1 point: Implementing the addresbook using TDD has been started and at least three tests have been written. All tests pass.
2 points: Adding contacts in the addressbook has been implemented using TDD. All tests pass.
3 points: Adding contacts and searching them has been implemented using TDD. All tests pass.
In the exercise group we will discuss the start of a project using TDD, and pair program a graphical user interface for AddressBook.