Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose Demonstrate the ability to download, install, and use 3rd party code. Demonstrate the ability to control compiler include paths. Demonstrate the ability to parse

Purpose

Demonstrate the ability to download, install, and use 3rd party code. Demonstrate the ability to control compiler include paths. Demonstrate the ability to parse and use command line arguments. Demonstrate the ability to utilize basic C++ File I/O to read and write files to the file system.

Assignment

You are to create a C++ program that opens an input file, reads and process the data in that file, and then writes the (possibly modified) data to a new output file. Your program should:

Accept arguments that are presented on the command line (see Usage box below).

Use the Templatized C++ Command Line Parser for argument processing (See the Templatized C++ Command Line Parser below). Illegal or missing options should be handled properly.

Store the parsing results into a C++ STL map. The map file must be indexed by a C++ enumerated list (enum) and should hold strings for values.

Within your code, you must query your map to get the values of the parsed command line arguments.

Finally, your program must present the correct behavior. The behavior is:

USAGE:

./program2 [-l] [-u] [-o ] [--] [--version] [-h]

Where:

-l, --lower

Convert all text to lowercase

-u, --upper

Convert all text to uppercase

-o , --outfile

The name of the output file

--, --ignore_rest

Ignores the rest of the labeled arguments following this flag.

--version

Displays version information and exits.

-h, --help

Displays usage information and exits.

(required) Input file

Your program should open the input file for reading and the output file for writing. It should copy all data from the input file to the output file while optionally converting case as directed by the command line arguments. -u and -l are mutually exclusive. Only one may be given but neither is required. If the output file is not specified (it is optional), you should write to a file with the default name of "output.txt".

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_2

Step: 3

blur-text-image_3

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

71/2 % of what amount is $1.46?

Answered: 1 week ago

Question

Define Administration and Management

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago