Question: c++ 1. Introduction You will implement a C++ program to decode different string of digits from the input file. This assignment focusses on array management

 c++ 1. Introduction You will implement a C++ program to decodedifferent string of digits from the input file. This assignment focusses onarray management and string handling in C++. You will also practice string

c++

1. Introduction You will implement a C++ program to decode different string of digits from the input file. This assignment focusses on array management and string handling in C++. You will also practice string manipulation with predefined string utility functions and basic file operations. 2. Input files - The input file will contain a list of encoded id numbers. The input can range anywhere from 0 to 100 entries. Input might contain empty lines and spaces (empty lines and spaces need to be removed to process each entry correctly). - Each entry will be on its own line and have 2 different parts: the coded characters set and id string. - The id string will consist of digits, alphabet characters, and the ' + ' sign. - Alphabet characters in the id string will always have a number representation for it in the characters set, each separated by a colon. - Semicolon is used to separate characters in the set and id string. - The id string will always come after the characters set in the entry. - Valid entry should have both parts, the characters set and the id string. - Invalid entry should be ignored. - Example of valid entry: - The plus sign (+) should be replaced by the repeated sum of the previous digits (see below for details on the computation). The first plus sign reduces to 5 , and the second plus sign reduces to 9 789114561233+2456+12378911456123352456+12378911456123352456+123789114561233524569123789114561233524569123 4. Repeated sum of digits The repeated sum of digits compresses a number of digits to a single value from 0-9. Consider the digits in front of the first plus sign above. These digits are: 789114561233. The sum of those digits is 50 , and the sum of these digits is 5 . Since this number falls in the range from 09, this is the repeated-sum of the digits. Continuing with the substitution made, the next set of digits in front of the remaining plus sign are: 78911456123352456. The sum of those digits is 72 , and the sum of these digits is 9 . Since this number falls in the range from 09, this is the repeated-sum of the digits. 5. Output files - The output file should contain all the valid id in the order they appeared in the input file (empty lines and spaces should be removed). - Each entry should be on its own line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!