COMP2080 Assignment 1 (10%) Due: 17th June XXXXXXXXXX:30PM Given: 23rd May 2022 Submission Requirements: The Student ID number for each member of the group must be commented at the top of the file....

1 answer below »
java assignment


COMP2080 Assignment 1 (10%) Due: 17th June 2022 11:30PM Given: 23rd May 2022 Submission Requirements: The Student ID number for each member of the group must be commented at the top of the file. Paste the code for each class and main program into this document. Choose one member of the group to make submissions on behalf of the group. The chosen member can make as many submissions (versions) as they like. Only the last submission will be marked. You must upload 1 item : The completed submission document . It must be in Word format with the code neat and visible. Group Information: Full Name Student Number Member 1 Member 2 (if any) ALL CLASSES FOR THIS ASSIGNMENT MUST BE CREATED FROM SCRATCH. NO BUILT IN DATA STRUCTURES MUST BE USED. You are required to create a personal dictionary and spellcheck program. There must only be two core classes. A class “wordInfo” and a class “dictionary”. The information stored on a wordInfo object consists of: A word: a string A meaning: a string The dictionary class is responsible for holding all the words (maximum 10000) and supports the following operations: public bool add (string word, string meaning) – adds a new word to the dictionary . No duplicate words are allowed. You must store all the word using a binary search tree. All words should be stored in lowercase. public bool delete (string word) – deletes the wordInfo object with the matching word. public string getMeaning(string word)- returns the meaning of the word. – The word must be found using binary search and then the meaning returned. Null is returned if the word is not found. public int getCount() – returns the number of words in the dictionary. Note that is must be implemented even if not used. public string printWordList () – returns a list of all the words stored in the dictionary in alphabetical order (only the words, not the meanings). public void printDictionary()- prints the full word and meaning for each wordInfo object in the dictionary (in ascending order). Create a main program with the following menu options: 1: Add new word 2: Delete word 3: Get meaning 4: Dictionary list 5: Print Dictionary. 6: Exit Notes: Add new word – This option should request a word and its meaning. Insert the word into the dictionary if it is new. No duplicates are allowed. All words are to be stored in lowercase letters. Delete word – This option should request a word and delete it from the dictionary. Get meaning - This option should request a word and print its meaning if found in the dictionary. If it is not found an appropriate message must be shown. Dictionary List- This option must simply list all the words contained in the dictionary. Note that the meanings should not be listed. Print Dictionary- This option should print all the words and meanings in the dictionary. Exit - This option should exit the program.
Answered 4 days AfterJun 16, 2022

Answer To: COMP2080 Assignment 1 (10%) Due: 17th June XXXXXXXXXX:30PM Given: 23rd May 2022 Submission...

Kshitij answered on Jun 20 2022
92 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here