A program to read a file containing an encrypted message

Assignment Help Computer Engineering
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.

Reference no: EM132211422

Questions Cloud

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.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd