Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming language is C++. Please include comments. 2. Program and input specification You will get a list of strings in an input file. Each line

Programming language is C++. Please include comments.image text in transcribedimage text in transcribed

2. Program and input specification You will get a list of strings in an input file. Each line will be considered as a single string. You need to find out the length of the common subsequence of characters from those strings which is the longest one. Assumptions: The input file is a small plain text file; no need to handle binary files. Each input file can have maximum 4 strings. A string can have maximum 1000 characters. An input file may contain empty lines between strings, then you will ignore it. The output should be exactly matched with the format. . . . . The main C++ program will become the executable to be tested by the TAs. The Result file should be written to another text file (output file), provided with the Command line. Notice the input and output files are specified in the command line, not inside the C++ code. Notice also the quotes in the program call, to avoid Unix/Windows gets confused. 3. Input and Output The input and output files are regular text files, where each line is terminated with a 'In' character. Each line will be treated as a string. The output file will contain the output. The output will be "Len:"+ the length of the subsequence. Note, in "Len: ", there is a space after the colon(:). 4. Program Execution: The general call to the executable is as follows Subsequence "input-input1.txtoutput-output1.txt" You can call the example with another command line type, Subsequence input-input1.txt output output1.txt 5. Examples Example 1 of input and output, Input11.txt abcd321ABCD abcD123ABCd Command line Subsequence input-input11.txt output-output11.txt Output11.txt Len: 7 Example 2 of input and output, Input12.txt Data Structures Using C++ Data Structures Using Java COSC 2430 is Data Structures course Data Structures Command line Subsequence input-input12.txt output-output12.txt Output12.txt Len: 15 Example 3 of input and output, Input13.txt Data Structures is an interesting course // empty line will not be counted We love Data Structures course Command line Subsequence input-input13.txt output-output13.txt Output13.txt Len: 23

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago