I have a java project that I need help on. The program is for word occurrences and I have a basic add() and frequency() methods I need help creating, not sure how to begin. here is the skeleton I am working with:
@Override
public void add(final String word, final int line) {
// TODO your job
word.add(line);
}
/*
* (non-Javadoc)
*
* @see edu.luc.cs.laufer.index.Index#frequency(java.lang.String)
*/
@Override
public int frequency(final String word) {
// TODO your job
return -1;
}
The problem is I have used .add() in other code before but I never created one. Can anyone help a beginner java coder or at least start me off in the right direction.