Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribed

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

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Be familiar with the basic ways to manage capacity.

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago