From time to time words become obsolete

Assignment Help Basic Computer Science
Reference no: EM13165811

Write a menu driven program that either accepts words and their meanings, or displays the list of words in lexicographical order (i.e. as in a dictionary). When an entry is to be added to the dictionary you must first enter the word as one string, and then enter the meaning as separate string. A word may have more than one meaning, and may be entered at separate times. When this occurs, place each successive meaning on a separate line. This new meaning must be preceded by a dash. For example, if you enter the following words and with their meanings in the following order: Library, School, Cup, and School, then your output should be a display as shown in the Figure 1 below.

________________________________________
Cup - a container from which we drink.

Library - a collection of books.

School - a place of learning

   - any group of fish
________________________________________

Figure 1.

One more requirement, from time to time words become obsolete. When this happens, such word must be removed from the dictionary. Your program must account for this also.

Use the JOptionPane class to enter the information.

Use the concept of linked list to carryout this exercise. You will need at minimum the following classes:
• A WordMeaning class that hold the name of a word and its meaning.
• A WordMeaningNode class that creates the node of information and its link field.
• A WordList class that creates and maintain a linked list of words and their meanings.

  • A Dictionary class that test your classes.

For the output, the program should produce two scrollable lists:

  • The current list of words and their meanings, and

• The list of the deleted words. You need not list the meanings, just the words.

Reference no: EM13165811

Questions Cloud

If ptr is a pointer to a character : If ptr is a pointer to a character and has been initialized to point to the first element of arr, write a statement using ptr that is equivalent to the statement array[4] = 12.
Various search trees and numerous sorting techniques : This week we were introduced to various search trees and numerous sorting techniques. Taking into consideration what you have learned this week, discuss how you can help Bob with his problem.
Test a program that prompts for the user : Write and test a program that prompts for the user to input a file name and uses two functions head() and tail() - head() displays the first 10 lines of a file
Program to input the length of the side from the keyboard : write a program to input the length of the side from the keyboard ,use the class to obtain the areas of all shapes and display the results on the screen
From time to time words become obsolete : One more requirement, from time to time words become obsolete. When this happens, such word must be removed from the dictionary. Your program must account for this also.
Generate an array of 20 random integers from 0 to 9 : generate an array of 20 random integers from 0 to 9. Search for the first occurrence, if any, of the number 7, and report its position in the array.
Create 4 order class fields : Create 4 Order class fields: order number, customer name, quantity ordered, and total price. Create public accessors for each field except total price.
The recommended entry strategy into international markets : An expert system is used to determine whether the recommended entry strategy into international markets should be Investment (I), Contractual (C), or Export (E).
Optimization is to add a sorting algorithm : The second optimization is to add a sorting algorithm. Each time you add an item to the array (from disk or from keyboard), you call a function called SortMyArray(), which use the bubble sorting algorithm to sort the array in the ascending order, ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Stage of ec purchase decision-making process

Banner advertising on Websites helps trigger a realization taht there is a gap between reality and a desired state, which occurs in the ______ stage of the EC purchase decision-making process.

  Understanding of storage classes and scope rules

It amounts to a "divide and conquer" approach to problem solving. This needs sound understanding of storage classes and scope rules. Response and or thoughts?

  Write a c++ program that prompts the user for two values

Write a C++ program that prompts the user for two values. The program then prints the two numbers in ascending order. If the two values are identical it prints a single line saying that both numbers are identical.

  Decreasing risk of malicious attacks in personal systems

Security budgets is devoted to decreasing risk of malicious attacks. What threats are you aware of when it comes to the personal systems and systems at job

  What ''are the differences between a policy, a standard

What 'are the differences between a policy, a standard, and a practice? What are the three types of security policies? Where would each be used? What type of policy would be needed to guide use of the Web? E-mail? Office equipment for personal use?

  Write a method that returns index of the smallest element

Write a method that returns the index of the smallest element in an array of integers

  The progresses report

The progresses report is a chance to highlight and discuss any issues that you are having in meeting the project plans. Discuss any changes to the original proposal and if needed propose a renegotiate plan on what is to be achieved for the project in..

  Details on any information

Details on any information/software that might not be submitted for evaluation due to NDA requirements or security/privacy concerns.

  Analyze the data to make business decisions

Database reports give us with ability to further analyze the data and give it in format which can be used to make business decisions.

  Calculate and display height and cost of container

Compute and display the height and cost of the container. Use the following formulas, where V is the volume, r is the radius, h is the height, and C is the cost.

  Explain benefits of a global market

What are some of the benefits of a global market and why? List at least 2 benefits, weighing any short-term and long-term impacts.

  Each cycle in an instruction cycle

Suppose each cycle in an instruction cycle takes an average of 5 clock cycles. Determine the number of clock cycles needed to process 10 instructions without and with a pipeline

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd