Write the new programming assignment named rosebud

Assignment Help Data Structure & Algorithms
Reference no: EM133680100

Binary Search Tree
Groucho Marx used to have a game show called "You Bet Your Life" in which he would have a conversation with the contestant and try to get him or her to say a specified "magic word." If the contestant said the magic word, a duck would drop down, signaling that the contestant had won a prize. This program deals with a similar game, which will have a specified set of magic words. The input consists of several passages of text. Read in each passage, see if it includes all the magic words, and print whether or not the person wins the prize. You must use a binary search tree ADT to store the magic words from the "Magic.txt" file to speed up searching for these magic words. You must use the binary search tree ADT code from our textbook. Do not use anything that would require you to include the libraries algorithm.h or vector.h or similar. If you have any questions about this, let me know before submitting the assignment.

Input
1. The magic words are listed, one word per line, in the text file "Magic.txt".
Example of the "Magic.txt" file:
Line 1: rosebud
Line 2: programming
Line 3: rainbow
Line 4: fish
Line 5: hashtag
Line 6: tweet

2. The text passages are input from a second text file, "TextPass.txt". Each line in this text file starts with a number indicating what type of data this is where 1 is the contestants name and 2 is a text passage. You will want to ignore passage ending punctuation such as "!" and "?". There can be more than one contestant in the "TextPass.txt" file.

Example of two contestants in the "TextPass.txt" file:
Line 1: 1 Bob
Line 2: 2 What am I doing here?
Line 3: 1 Mary
Line 4: 2 I am about to tweet hashtag rainbow fish and by the way, did you write the new programming assignment named rosebud? Output

All program output is to be written to a text file "Output.txt", which is printed and turned in with your program listing.

1. Echo print the list of magic words. (Echo means that you are to print to the console and the output text file)
2. Echo print each section as it is read. Label the contestant's name.
3. In processing each text passage, keep track of which magic words were said, and at the end of the section, print out one of the following messages:
Congratulations, <name>, you have won the prize.
Sorry, <name>, you failed to say the following magic words:
<list of unsaid magic words>

Reference no: EM133680100

Questions Cloud

Compare relative performance of different sorting algorithms : Compare the relative performance of different sorting algorithms on the same data set. Second. you are to compare the relative performance of the same algorithm
Can you think or know of any strategy methods or training : I want to add that withitness is also being able to know. Can you think or know of any strategy/methods/ training to help teachers enhance withitness?
Describe the research method in two to three sentences : PSYC 3520- Describe the research method in 2-3 sentences (in your own words, not quoted). Include in-text citation.
Discuss a scene that depicts the negative symptoms : Discuss a scene that depicts the positive symptoms of schizophrenia. Discuss a scene that depicts the negative symptoms.
Write the new programming assignment named rosebud : I am about to tweet hashtag rainbow fish and by the way, did you write the new programming assignment named rosebud
Develop one primary idea or perception support it : Like any good essay, your reaction paper should develop one primary idea or perception, support it with specific evidence.
Creating culture of ethical behavior : An integrity strategy would focus on creating a culture of ethical behavior throughout the organization.
Compliance of hipaa privacy : What type of educational activities do you feel should be provided for the "workforce" to help in the compliance of the HIPAA privacy
What agencies are responsible for implementing social policy : What agencies/organizations are responsible for implementing the social policy? How much discretion do they have when implementing the social policy?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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