Programming Challenge 3
Description
Create a class wrapping around a dynamically sized array of integers. Use RAII to manage the class. In this first case, do not use smart pointers or data structures from the standard library. Then, make a second version of your class that usesstd::unique_ptr
. Provide methods for adding data,
removing data, and accessing data. Write a simple test program to verify
accuracy.
Details
- Name the files and program
classic_dyn_int_array.h/cpp
,modern_dyn_int_array.h/cpp
andtest.cpp
, respectively. - In your top file comment, please reflect on this exercise. Briefly state how your refactoring simplified the implementation.
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).