Menu

Done Part 1 Please Help Rest Homework 1 100 Points One Dimensional Arrays 22bh1acpp 22bh1b Q43898585

i have done part 1

PLease help me with the rest

Homework 1

100 Points

One Dimensional Arrays

22B_H_1A.cpp 22B_H_1B.cpp Pr8-3_BinS.cpp 22B_H_1C.cpp

– Binary Search: Find and fix errors –

Insertion Sort: Find and fix errors –

Binary Search: Code Review – Search a Sorted List of Strings

Project: Searching a Sorted List of Strings

Write a language translation program that permits the entry of aword in English and prints the corresponding word in anotherlanguage. The input file dictionary.txt contains up to 128 lines.On each line there is word in English followed by its translationin Hawaiian. You may assume that each line contains exactly twowords and that the

English words in the file are in alphabetical order, as shownbelow:

above luna below lalo bird manu branch lala canoe wa’a

Create the input file using data on the next page. Read datafrom the input file into two parallel arrays. Use arrays of maximumsize 128. In case the input file contains data for more than 128names, print an error message such as “The file contains more than128 lines!” and terminate the program.

Change the Binary Search function to search the parallel arrays,then test it in a loop as it is shown in Program 8-3. Prompt theuser to enter a word in English, such as bird then call the BinarySearch function to search for bird. If found, display the Hawaiianword for bird: manu, otherwise display an error message.

Keep track of the number of successful searches for each studentin another array. When done searching, write the arrays to anoutput file named results.txt, as shown below.

5 below lalo 11 bird manu

1 canoe wa’a

The first number on the first line, 5, shows that there were 5searches for below, the first number on the second line, 11, showsthat there were 11 searches for bird, and so on. Notice that thewords that were not searched for, such as branch are not savedto
the output file.

Next Page

Grading

Program 1A Program 1B Program Pr8-3_BinS Program 1C

Self Assessment Report

– 15Points – 20
– 10
– 50

– 5
– 50

arrays

Grading Program 1C
Read data from file into

– 10Points – 10
– 10
– 10

– 10

Run each program once and save the output at the end of thesource file as
Compress the source files, input and output files (if any), and thereport, and upload the compressed file:22B_LastName_FirstName_H1.zip

Self Assessment Report: Write a short report, (see22B_H_1Report.docx form) briefly explaining your code andcontaining an assessment of your implementation based on the abovegrading criteria.

Binary Search
Call Binary Search in a loop Frequency array
Write arrays to a file

Create the input file dictionary.txt using the followingdata:

a comment.

Next Page

above lunabelow lalobird manubranch lalacanoe wa’aclub huicoconut niucompose hakuday laeasy ma’alahifather makuakanefloat lanaforest ulula’augarden malagarland leigift makanahello alohahuge nunuikitchen lumikulelarge nuilisten ho’olohemarket makekemoon mahinamother makuahinename inoaparent makuapay uku

Sample Output:

Welina!
Welcome!
This program translates English words to Hawaiian.

What is the input file’s name?

disctionary.txt
Please enter a word in English: triggerfish

“triggerfish” in Hawaiian is “humuhumunukunukuapua’a”

Do you want to search again? (y/n): y
Please enter a word in English: computer
Sorry, we do not have “computer” in our dictionary.

Do you want to search again? (y/n): y Please enter a word inEnglish: bird “bird” in Hawaiian is “manu”

Do you want to search again? (y/n): y
Please enter a word in English: triggerfish
“triggerfish” in Hawaiian is “humuhumunukunukuapua’a”

Do you want to search again? (y/n): y
Please enter a word in English: triggerfish
“triggerfish” in Hawaiian is “humuhumunukunukuapua’a”

Do you want to search again? (y/n): n
Your search history has been saved into an output file named

“results.txt”.

Thanks for using our program!

Mahalo!
Sample Output File:

1 bird manu
3 triggerfish humuhumunukunukuapua’a

porch lanai
practice ho’oma’ama’a
rice laiki
room lumi
sand one
seaweed manauea
shark mano
sky lani
star hoku
student haumana
thanks mahalo
they lakou
think mana’o
tired maluhiluhi
triggerfish humuhumunukunukuapua’a turtle honu
twenty iwakalua
watch uaki
wave nanea
wind makani
work hana
year makahik

Expert Answer


Answer to i have done part 1 PLease help me with the rest Homework 1 100 Points One Dimensional Arrays 22B_H_1A.cpp 22B_H_1B.cpp P…

OR