COMP 271 002 F17 Lab 2
YOu may work in teams of two but submit individually (see details below)
An understanding of the following concepts and techniques:
- entity objects
- linear search
- binary search
- algorithmic complexity
- arrays versus lists
- optional values
- DRY and factoring out methods
- automated unit testing using JUnit
- testing for exceptions
- test fixtures and assertions
- Review the code.
- Run the code for various inputs to gain an understanding of what it does.
- Complete the items marked TODO in the code and get the tests to pass.
- Create a markdown document called Answers.md and answer the questions in the next section.
- What is the complexity of each of the four search methods in terms of array or list size n?
- What happens in the case of binary search if the array is not sorted?
- What is the purpose of constructor argument validity checking?
- What is the purpose of using the keyword
finalwith variables and arguments?
- What are alternatives to using
Optionaland how do they compare?
Deliverables and submission
Please submit the following deliverables individually:
- Individual GitHub lab2 repository
- Individual Sakai submission under "Lab 2":
- URL of GitHub repository
- Brief description of your collaboration style and summary of your individual contributions if you worked in a team
- 2 Main: eliminate this code duplication
- 2 Team: constructor with validation
- 2 Team: remaining getters
- 2 Search: findTeamPosition for List
- 2 Search: findTeamMinFunding (linear search)
- 4 Search: findTeamMinFundingFast (binary search)
- 2 TestTeam: remaining tests
- 2 TestSearch: makeListFixture
- 4 TestSearch: remaining tests
- 4 correct Gradle-based project structure
- 4 correct use of Git version control
- 10 Written part
- 6 responses to the questions above
- 2 grammar and style
- 2 formatting
40 points TOTAL