Reference no: EM132211422
Question :
Write a program to read a file containing an encrypted message, which must be decoded and printed on the screen.
Use the following key to decode: input text : abcdefghijklmnopqrstuvwxyz decoded text: iztohndbeqrkglmacsvwfuypjx That means each 'a' in the input text should be replaced with an 'i', each 'b' with a 'z' and so forth.
Punctuation and space should be kept as is. You will notice that all the letters in the text are lowercase, so the second step will be to fix the captalization.
First letter of each sentence should be capitalized. Print the decoded text to the screen. You must use an object-oriented approach on this lab.
The specification of class Message is given in header file Message.h. You need to implement each of the member functions in the Message.cpp, which you will turn in.
The main function is also given so you can test your class, but you don't have to turn it in. I have added in the class definition in "Message.h" that explain how to implement each member function. Constructor: Should open the text file and determine its size.
To do this, call getFileSize() which is implemented in "Message.h". Check for errors when opening the input file and don't forget to close it at the end.
If there is an error, such as the file can't be located, make sure to set length to zero. Otherwise, use the file size to allocate space for message.
Destructor: should free the space allocated for message. decode: decodes the message according to the given key. fixCapitalization: capitalizes the first letter of each sentence. dump: prints the content of message on the screen isEmpty: returns whether message is empty of not.
You only have to turn in message.cpp. You have to make sure it works with the header file that I'm providing, since it will be used to compile your message.cpp.
Write a program that reads the contents of the two files
: Write a program that reads the contents of the two files into two separate arrays, or ArrayLists.
|
Journalize all entries required on the given dates
: Journalize all entries required on the above dates, including entries to update depreciation, where applicable, on assets disposed of. Pronghorn Company
|
Print the number of vowels and consonants in the word
: Write a program that reads a word and prints the number of vowels and consonants in the word.
|
Write out pseudocode using given information
: Write a program that reads in values from the user and if each value is not a duplicate of a value already read in, then display those values.
|
A program to read a file containing an encrypted message
: Write a program to read a file containing an encrypted message, which must be decoded and printed on the screen.
|
Compute the revised annual depreciation
: On January 1, 2020, the Martinez Company ledger shows Equipment $31,000. Compute the revised annual depreciation
|
Write a program that reads three edges for a triangle
: Write a program that reads three edges for a triangle and computes the perimeter if the input is valid. Otherwise, display that the input is invalid.
|
Write a program and store it in a file
: Write a program, and store it in a file called String Funtions.xlsm, that does the following: It asks the user for a word with at least 10 characters and stores
|
Write a program that reads and produces two files separating
: Write a program that reads and produces two files separating the data for the boys and the girls, and listing them in alphabetical order.
|