Implement vector class using pointers

Assignment Help C/C++ Programming
Reference no: EM131799707

C++ Programming

In this assignment, you will use pointers to implement our own vector class.

It will have the following features:

Dynamically allocated array of integers.

Size variable that keeps track of the number of elements in the array. Starts at 0.

Capacity variable that keeps track of the amount of memory allocated for the array. Starts at capacity 1.

Each time the size reaches the capacity, double the capacity

Several of the features available from the STL vector (insert, erase, push back, etc) You will submit 3 files:
MyVector.h MyVector.cpp main.cpp

Output of 3 pushbacks:

Choose from the following menu:
1) Push back
2) Insert
3) Erase
4) Print
5) Size
6) Capacity
7) Exit.
1
Enter the number to push back: 1 Choose from the following menu:
1) Push back
2) Insert
3) Erase
4) Print
5) Size
6) Capacity
7) Exit.
1
Enter the number to push back: 2 Choose from the following menu:
1) Push back
2) Insert
3) Erase
4) Print
5) Size
6) Capacity
7) Exit.
1

Enter the number to push back: 3 Choose from the following menu:
1) Push back
2) Insert
3) Erase
4) Print
5) Size
6) Capacity
7) Exit. 4 Contents: 1 2 3

Choose from the following menu:
1) Push back
2) Insert
3) Erase
4) Print
5) Size
6) Capacity
7) Exit.
7

Reference no: EM131799707

Questions Cloud

What would be the impact to monthly profits : Ignore the impact of income taxes in your calculation. Should the order be accepted? What would be the impact to monthly profits
Discuss how much is the direct material quantity variance : The company purchased 8,200 yards $7.75/yard how much is the direct material quantity variance
Compute the amount to be recorded on the books : Sneathen Company purchased a restaurant building, land, and equipment for $600,000 cash. Compute the amount to be recorded on the books for each of the assets.
Consider potential barriers they might encounter in society : Empowerment is a process; and one part of that process is to gain an awareness of the oppressive structures evident in our society.
Implement vector class using pointers : In this assignment, you will use pointers to implement our own vector class. It will have the features- Dynamically allocated array of integers
Implement affirmative action plans : Are all employers required to implement affirmative action plans? If not all, which category of employers must implement a plan?
Problem regarding the employment relationships : William Moore owned and operated Moore Enterprises, a wholesale tire business, in Idaho. While in high school, Williams son, Jonathan, worked
Discuss how much is the minimum acceptable selling price : how many units are produced. in negotiating a price, how much is the minimum acceptable selling price
Determine the transaction price of the arrangement for aaron : Commission of $100. In addition, Aaron will receive a further commission. Determine transaction price of arrangement for Aaron, assuming 100 policies are sold.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd