Question
Please expert I need this task in C++ language quickly please . Exercises: A file transformer reads an input file, transforms it in some way,
Please expert I need this task in C++ language quickly please .
Exercises: A file transformer reads an input file, transforms it in some way, and writes the results to an output file. Write an abstract file transformer class that defines a pure virtual function for transforming a character. Create one derived class of your file transformer class that performs encryption, another that transforms a file to all uppercase, and another that creates an unchanged copy of the original file. The class should have the following member function: void doTransform(ifstream &in, ofstream &out) This function should be called to perform the actual transformation. The member function for transforming a single character should have the prototype: char convert(char ch) The encryption class should have a constructor that takes an integer as an argument and uses it as the encryption key. Task 1: Implement fileTransformer & copyFile classes and try the provided main to test your code. Task 2: Implement upperFile class and try the provided main to test your code. You may use the read-made function toUpper provided in iomanip. Task 3: Implement encryptFile class and try the provided main to test your code. Bonus Task: Add a decrypt function to the class encryptFile. The function takes an input file (ifstream) to read encrypted data from, and an output file (ofstream) to write data to after decryption. The function uses the member variable key for decryption. In main, call decrypt using a[2] , giving it the file you encrypted in task 3 as input and an output file called decrypted.txt.
Base Code below may be used. CS213: Object Oriented Programming #include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started