Write a program to manage a dictionary

Assignment Help Basic Computer Science
Reference no: EM13306552

Write a program to manage a dictionary. Your dictionary should be stored on a text file named diction.txt and consist of an alphabetized list of words, one per line. When a user enters a word, scan the dictionary looking for the word. If the word is in the dictionary, say so. If not, display the dictionary word immediately preceding and the word immediately following so that user can see words that are close in spelling. Then ask whether the user wants to add this new word to the dictionary. If the answer is yes, do so and go back to request the next word.

To insert a word into a file in alphabetical order, simply copy the file to a new temporary file named diction.tmp and move words one at a time from the temporary file back to the original file, inserting the new word when you reach its correct position alphabetically. Turn in your source code and your diction.txt file.

 

Reference no: EM13306552

Questions Cloud

Find how much energy must be supplied to the refrigerator : An ideal refrigerator utilizes a Carnot cycle operating between 0 degrees Celcius and 18 degrees Celcius. How much energy must be supplied to the refrigerator
What is the net charge contained in the cylinder : A closed Gaussian cylinder sits centered around the z-axis and above the xy-plane with a length of A and a radius of R, What is the net charge contained in the cylinder
Interrogating technology sustinability : Interrogating technology:sustinability, environment and social change
Write a menu driven program : Write a menu driven program that allows the user to enter five numbers and then choose between finding the smallest , sum or average of the numbers.
Write a program to manage a dictionary : Then ask whether the user wants to add this new word to the dictionary. If the answer is yes, do so and go back to request the next word.
What was the maximum speed after it hit bottom : The initial height of the ball is 60.0m and has a potential energy and initial pe of 1176.00, What was the maximum speed after it hit bottom
Find pythagorean triplets : Given an array of integers, find Pythagorean triplets. i.e. find a,b and c which satisfies a^2 + b^2 = c^2 Integers could be positive or negative.
What is the maximum positive emf : The ems of an AC circuit has an rms value of 120V. What is the maximum positive emf
The meeting and implemented immediately : State the issues, as you know them, and request that the team members come with ideas so this problem can be resolved at the meeting and implemented immediately.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Human and nature dynamics (handy) model

This paper is centered around some results obtained from the Human and Nature Dynamics (HANDY) model. This model is equation 3 in their paper.

  What are the primary tasks of a system administrator

what are the primary tasks of a system administrator? 2. What does each task accomplish

  Design linked list class hold customer name and phone number

Design your own linked list (LL) class to hold customer names and phone numbers. The class should have member functions for appending, inserting, deleting, searching and displaying nodes.

  Given a scanner of double values

public double[] stats(Scanner scanner) Given a Scanner of double values, return an array of capacity three that has the maximum value in the Scanner as the value in result[0]

  Write a program that reads from the external file

write a program that reads from the external file input.txt, counts the letters in every word , replaces the word by that number and then writes the numbers to an external file output.txt (note: do not forget to copy the blanks

  What is the current size of q

Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operations, 5 of which generated QueueEmptyExceptions,

  Explain bindings which are required to determine semantics

Write simple assignment statement with one arithmetic operator in some language you know. For each component of statement, write various bindings which are needed to determine semantics.

  How to design a new isa

How to design a new ISA? What should take into consideration?

  Design an algorithm that prompts the user to enter a number

Design an algorithm that prompts the user to enter a number in the range of 1 through 100 and validates the input.

  Why chain of custody must be followed in investigation

You are a computer forensics investigator for a law firm. The firm acquired a new client, a young woman who was fired. What is chain of custody and why must it be followed in investigations?

  Write a program that accepts as input the mass

Write a program that accepts as input the mass,in grams, and density, in grams per cubic centimeters, and outputs the volume of the object using the formula: volume=mass/density. format your output to two decimal places

  Problem of determining whether a dfa

Consider the problem of determining whether a DFA and a regular expression are equivalent. Express this problem as a language and show that it is decidable.

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