Question
Need Help. Please follow the commented instructions in the Dictionary.java file below: import java.util.ArrayList; //Import anything you need here public class Dictionary { // Declare
Need Help.
Please follow the commented instructions in the Dictionary.java file below:
import java.util.ArrayList; //Import anything you need here public class Dictionary { // Declare any variables you feel necessary here public Dictionary(/*DO NOT PUT ANY PARAMETERS HERE!*/) { // Initialise those variables } /*** * @return number of terms currently in the dictionary hint: starts at 0 when * there are no terms */ public int numberOfTerms() { return 0; } /*** * Add a Term to your dictionary, given a word and a definition, store them for * later use in your dictionary * * @param word * @param definition * */ public void addTerm(String word, String definition) { } /** * Implement functionality to retrieve a random term from your dictionary. This * could be used for a word of the day on a website. * * @return */ public Term getRandomTerm() { return null; } /** * Given a partial search string, check if any of the words you have stored match the given search string. * * If your dictionary contained Terms: apple, pineapple, paper, master. * * If search contained "ap" the results should be an ArrayList containing: apple, pineapple, paper. * * @param search * @return An ArrayList of Strings containing the results */ public ArrayList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started