Program that opens a local fle C:\DataDirectory\data.txt solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (1 vote)

Part 1
Write a program that opens a local fle C:\DataDirectory\data.txt reads in the data into your programwithout removing the data From the fle and appends new data onto the end oF the exisTng data in theprogram, and then appends the new data onto the exisTng data within the fle.±or example, iF the data fle originally contained the Following data:Hello²hen when your program is done, it should say:HelloHello my name is BobAlso, you must uTlize excepTon handing technique to validate that the fle has been open, and o³er theuser a chance to enter a correct flename unTl the fle is Found.Hint: Use the overloaded open FuncTons, or use random access methodology

Part 2
.LeTer frequencies.If you were to encrypt a Fle using the cipher of Exercise P9.2, the leTers will mixed up, and will appearas that you cannot decrypt it without the keyword. Also, it would seem illogical to try and guess thekeyword, but someone who is trained in decryp±on would have no trouble breaking the cipher. ²heaverage leTer frequencies of English leTers are common knowledge. ²he most common leTer E, occursabout 13% of the ±me.1. See Exhibit B.2.Write a program that reads as an input Fle and shows the leTer frequencies in the Fle. ²his tool isinvaluable to a code breaker. If the most frequent leTers are H and K there is a high probability that theyare the encryp±ons of E and ².(op±onal)1.Expand on your 9.3 project to add components that either aide in prin±ng out a deciphered message,or to automa±cally aTempt to output