Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thank you in advance COSC 1430: Optional Assignment File I/O and Structs 1- Purposc The purpose of this assignment is to provide extra practice on

Thank you in advance image text in transcribed
image text in transcribed
image text in transcribed
COSC 1430: Optional Assignment File I/O and Structs 1- Purposc The purpose of this assignment is to provide extra practice on fle VO and Structs with the use of dynamic arrays For this assignment, you will need to turn in 1 le: decode.cpp. It should be turned in your home directory on the the server. Do not make a separate folder and store it in there. Also, make sure that no other cpp files or unnecessary files in your home directory. If you have other programs or files, make a new directory and store the other programs in there. Make sure your code compiles and runs on the Due: Sunday, March, 18 at 11:59 PM 2 Problem You will be provided with an input file that has a series of encoded messages. You will need to read in the file and decode the messages. You must check to make sure that the input file has been opened lf not, you need to print "input File unable to open. to the output file. The first 26 lines of the input file will tell you what each coded letter should equal. For example: A Z' means that for every A in a coded message, it should be replaced with a Z. You should store this information in an array for easy decoding. This set of information will always be presented A through Z so that you may assign an array position to a letter, ie, index 0 will always be A The next number in the file will be the number of coded messages that will be contained in the file. This number should be used to make a dynamic array of the structs (ie., the number is the size of the dynamic array). You will need to create a struct that contains an integer type of variable that keeps track of which message number is contained in the struct, and two strings, the coded message and the decoded struct messages string codedMessage: string decodedlessage

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions