Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show work in visual studio C# Anagram n: a word or phrase spelled by rearranging the letters of another word or phrase An example

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

please show work in visual studio C#

Anagram n: a word or phrase spelled by rearranging the letters of another word or phrase An example of an Anagram of the word Dormitory is Dirty Room since you can rearrange the letters in Dormitory to spell Dirty Room. In this lab, you will read in several words from a file (dict.txt). These words will be our Word Dictionary. Next, you will read another file (pal.txt) where each line of the file will be a sentence. This will be our Potential Anagram List (PAL). Everything will use capital letters. For every line that you read from the Anagram List (pal.txt), you will compute its histogram (ignoring spaces) and compare it with the histogram computed for each word in the Word Dictionary. If you find that the phrase from the Potential Anagram List has a histogram that is the same as the histogram for one of the words in the Word Dictionary, you will add the pair to a ListBox to show the user that you have found an Anagram/Word pair. In addition, you will practice a library that was created in another language, Visual Basic (VB). As the application programmer there is no requirement on your side to know anything about VB but you will need to know how to include a library (dll) that has been created using VB in your project. This lab contains step-by-step instructions on how to add such library to your project and use the methods defined in the library. In your application you will be calling a method that computes the histogram for the given word or phrase. PART A The Histo library (Histo.dll) is provided for you with a method (Create Histogram) that counts and creates the histogram of the characters in a given word or phrase. You will simply include this library on to your project and then you will be able to call this method. Follow the steps shown in the following screenshots to include Histo.dll to your solution References folder. EGR 1400 HANNA / SIADAT 1 rafmann Reference Manager - Anagram2 Assemblies Projects Name Histo.dll Shared Projects Search Browse (Ctrl+E) Path Name: C:\Users\siadat Histo.dll Created by: File Version: 1.0.0.0 D COM 4 Browse Recent Select Browse, select "Histo.dll" and click OK } Browse... OK Cancel Form Lint the Anagrams Your program result may look like the screenshot below when the user clicks on the button. Form1 GEORGE W BUSH -> WHERE BUGS GO DORMITORY -> DIRTY ROOM DESPERATION - A ROPE ENDS IT THE MORSE CODE -> HERE COME DOTS SLOT MACHINES - CASH LOST IN EM ANIMOSITY-> IS NO AMITY HELLO KITTY -> KILL THE TOY MOTHER IN LAW -> WOMAN HITLER SNOOZE ALARMS -> ALAS NO MORE ZS BUILT TO STAY FREE STATUE OF LIBERTY A DECIMAL POINT -> IM A DOT IN PLACE ELEVEN PLUS TWO TWELVE PLUS ONE PRESIDENT CLINTON OF THE USA - TO COPULATE HE FINDS INTERNS CUNT EASTWOOD -> OLD WEST ACTION List the Anagrams Here is an example of how to call Create Histogram subroutine from Histogram class within Histo library: List the Anagrams Here is an example of how to call Create Histogram subroutine from Histogram class within Histo library: Histo.Histogram.CreateHistogram(theHistogram, palWord); where the Histogram1 is an empty histogram (array of integers) passed to Create Histogram by reference." Note that when an array is passed to a method, it is passed by ref" by default. The palWord is a string variable that contains a line from the dict.txt dictWord = input1.ReadLine(); Two input files are provided for you with this lab assignment: dict.txt and pal.txt dict.txt - Notepad File Edit Format View Help GEORGE W BUSH DORMITORY DESPERATION THE MORSE CODE SLOT MACHINES ANIMOSITY HELLO KITTY MOTHER IN LAW SNOOZE ALARMS BUILT TO STAY FREE A DECIMAL POINT ELEVEN PLUS TWO PRESIDENT CLINTON OF THE USA I LOVE LUCY THE THREE AMIGOS CLINT EASTWOOD MICROSOFT WINDOWS palitat Notepad File Edit Format View Help A ROPE ENDS IT DIRTY ROOM IS NO AMITY RUB A DUB DUB HE BUGS GORE TWELVE PLUS ONE SHES NOT FUN KILL THE TOY WOMAN HITLER HERE COME DOTS SOWN IN DISCOMFORT RAINING OOS TO COPULATE HE FINDS INTERNS CASH LOST IN EM OLD WEST ACTION IM A DOT IN PLACE PURPLE MONSTER ALAS NO MORE ZS A GOLDEN GOOSE STATUE OF LIBERTY WHERE BUGS GO DO NOT CHANGE OR MODIFY THESE FILES

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

What is paper chromatography?

Answered: 1 week ago

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago