C++ Coding

User Generated

xknahfun1111

Programming

Description

All the instruction are in the file names instructions. The main.cpp files and other needed code files are inside the code file. If any questions, please ask.

Unformatted Attachment Preview

CSCE 221 Cover Page Programming Assignment #1 Due July 10th by midnight to eCampus First Name Last Name UIN June 11, 2018 User Name address E-mail Please list all sources in the table below including web pages which you used to solve or implement the current homework. If you fail to cite sources you can get a lower number of points or even zero, read more: Aggie Honor System Office Type of sources People Web pages (provide URL) Printed material Other Sources I certify that I have listed all the sources that I used to develop the solutions/codes to the submitted work. “On my honor as an Aggie, I have neither given nor received any unauthorized help on this academic work.” Your Name Date 1 Programming Assignment 1 (130 points) In the first phase of the assignment, implement in C++ a class My_vec that can hold data of character type (char). The description of the functions for data manipulation is provided in the first set of the lecture notes, see the slide 8. In the second phase, write a generic version of the class My_vec that can handle any type of data. Instructions: 1. Download the supplementary file with a sample code from the class webpage. 2. Your files should be arranged as follows (a) Declaration of My_vec class in My_vec.h (b) Definition (implementation) of My_vec class in My_vec.cpp (c) Testing code in Main.cpp (d) Use Makefile by calling make 3. Compile your program using the Linux machine command line: g++ -std=c++11 *.cpp or make all 4. Run your program by executing ./Main 5. Be sure to increase or decrease allocated memory when you insert to or remove from a vector. 6. Be sure to check the vector size against its capacity. If its size is greater than its capacity then allocate more memory by doubling the current capacity and copying the content of the vector. Points Distribution for Assignment (for part 1 and 2) 1. My_vec class member functions: (a) (4 pt) elem_at_rank (b) (8 pt) insert_at_rank i. ii. iii. iv. v. (4 pt) replace_at_rank (8 pt) remove_at_rank (8 pt) constructors and copy constructor (12 pt) destructor, the assignment operator (6 pt) overloading the bracket [] operator (c) non-member functions: i. (6 pt) overloading
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached.

I modified the existing My_vec class. In orde...


Anonymous
Excellent resource! Really helped me get the gist of things.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags