For this homework, you will create a class that implements the ForwardIndex
interface and provide a missing default
implementations in the ForwardIndex
interface itself.
Below are some hints that may help with this homework assignment:
-
The code will not compile until you implement the
ForwardIndex
interface in theWordIndex
class forPath
objects properly. -
When creating a default implementation, you can call other methods in the interface even if they are not implemented.
-
Most of the implementations require 1 to 3 lines of code.
-
::warning:: This homework helps you think about design for the project, but should not be used directly in your project. Your project requires an inverted index (the word is indexed), and this homework is a forward index (the location is indexed).
These hints are optional. There may be multiple approaches to solving this homework.
Use the "Tasks" view in Eclipse to find the TODO
comments for what need to be implemented and the "Javadoc" view to see additional details.
The tests are provided in the src/test/
directory; do not modify any of the files in that directory. Check the run details on GitHub Actions for how many points each test group is worth.
See the Homework Guides for additional details on homework requirements and submission.