Computers and Technology

Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented as strings) and the other vector contains a dictionary of abbreviations for those words (also represented as strings) in the same order. Write a function that reads a file string-by-string and returns the contents of the file to a string, with any abbreviated words or phrases in your dictionary that appear in the input file replaced by the corresponding word or phrase. You may use the following function prototype: string abbrToFull(string filename, vector abbrDict, vector fullDict);
Hint: Suppose your dictionary contains "National Science Foundation" (abbreviated as "NSF") and "Department of Defense" (abbreviated as "DoD"). Then, if the input file contains the following sentence: "UB's Department of Electrical Engineering receives a lot of research funding from the NSF and DoD", the function should return the following string: "UB's Department of Electrical Engineering receives a lot of research funding from the National Science Foundation and Department of Defense". For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:30, sunshinekisses
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
image
Computers and Technology, 23.06.2019 22:00, elijah1090
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
image
Computers and Technology, 23.06.2019 22:20, andrew412603
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
image
Computers and Technology, 24.06.2019 00:50, JakeCline
Which of the following is not a key player in the sale of travel products?
Answers: 2
Do you know the correct answer?
Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented...

Questions in other subjects: