Programming Challenge 5
Description
Create a simple class hierarchy for a polymorphic typeDataTransform
. Provide two subclasses: Reverse
and Substitute
. Let the data that is operated on be an array of
integers. Write a test in main that demonstrates a simple undo/redo sequence of
user defined operations (use a stack).
Assume
Reverse
is not meant to be inherited from again, but
Substitute
might be. Write the hierarchy using modern protective
keywords, e.g., override and final.
Details
- Name the files and program
data_trasforms.cpp
. - In your top file comment, please describe what is most surprising and what is most frustrating about polymorphism in C++.
General Instructions, Turning in assignments, and Grading
General Instructions
- Name each file and program as listed in the instructions.
- The top of each program should have a comment block where the first line
is your name and following lines are a description of your program and
references used in programming.
//Name: Jory Denny
//This program debates Batman vs Superman!
//References:
// - Ref 1. - Follow turn-in instructions precisely.
- Failure to complete any of these steps will result in an incomplete.
Turn in Instructions
Each assignment will be turned in through GitHub classroom. Please find the link to create a repository at the top of this page, or through this link. Assignments are due BEFORE, let me repeat, before class starts. This does not mean five minutes after class starts.
- Soft copy (Online submission)
- Accept the invitation to the classroom assignment, which creates your repository on GitHub.
- Clone this repository, which includes some starting files.
- Add assignment files (stage, commit, push).
- Modify the Coverpage.txt file to provide name, sources, signature of following the honor code, etc. Be sure to stage, commit, and push these changes as well. If you do not fill out the coverpage, I will not grade the assignment.
- After the due date, I will clone your repository and add a grade and comments as necessary. After which you can pull these changes for your records.
Points
- Each assignment is a completion grade. In order to receive a completion, the code must compile and all parts of the challenge need to be completed.
- Note - a compiling, correct program ≠ 100%, just like a composed paper with the minimum requirements discussed ≠ 100% for an English Writing class.
- If there are any discrepancies in grades please see the instructor during his office hours or by appointment (do not discuss with the lab assistants or graders).