For this homework, you will create a class that implements the ForwardIndex interface and provide a missing default implementations in the ForwardIndex interface itself. See the Javadoc comments in the template code for additional details.
Below are some hints that may help with this homework assignment:
-
The code will not compile until you implement the
ForwardIndexinterface in theTextFileIndexclass forPathobjects properly. -
When creating a
defaultimplementation, you can call other methods in the interface even if they are not implemented. -
Do not @Override the
defaultmethods inForwardIndexin theTextFileIndexclass. -
You do not need to provide Javadoc comments for inherited methods.
-
Most of the implementations require 1 to 3 lines of code.
-
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.
See the Javadoc and TODO comments in the template code in the src/main/java directory for additional details. You must pass the tests provided in the src/test/java directory. Do not modify any of the files in the src/test directory.
See the Homework Guides for additional details on homework requirements and submission.