Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

FOR C++ You are tasked with designing and coding a program that can accomplish four things: copy one file to another (i.e., place the contents

FOR C++

You are tasked with designing and coding a program that can accomplish four things: copy one file to another (i.e., place the contents of file A into file B), compress a file by removing all vowels (a, e, i, o, u, and y) from the file, merge two files, and finally double each line of an input file, saving into an output file.

Program Specifications

The program should be menu driven with the top level menu being:

----------------------------------------------------------- Welcome to the File Copier

1) copy file A to file B

2) compress file A (remove all vowels from the file), saving into file B

3) double file A -- for each character in the input file, repeat it twice in the output file B.

4) merge file A and file B saving into file C. (places all of file A in output file C, then adds all of file B after that into file C).

5) quit the program

-----------------------------------------------------------

Appropriate user prompts shall be provided for each choice (e.g.; for selection 2, you must prompt the user for the name of files A and B). Be sure to keep asking them what they want to do until they ask to quit the program. Be sure to check for errors.

For doubling and compressing a file here is an example:

Input file:

This is a test. The lazy dog ran over the moon. Able was I ere I saw elba. I don't know what to type.

Output File (doubled):

TThhiiss iiss aa tteesstt.. TThhee llaazzyy ddoogg rraann oovveerr tthhee mmoooonn.. AAbbllee wwaass II eerree II ssaaww eellbbaa.. II ddoonn''tt kknnooww wwhhaatt ttoo ttyyppee..

Output File (compressed):

Ths s tst. Th lz dg rn vr th mn. bl ws r sw lb. dn't knw wht t tp.

-----------------------------------------------------------------------------------------

Thank you

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

Students also viewed these Databases questions