Use pointers to implement our own vector class

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

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.

Reference no: EM131802448

Questions Cloud

Briefly describe three logistics operations risksm : Identify and briefly describe 3 Logistics operations Risksm,
How the positions are the same or different : After you have summarized the essay and selected your quotations, prepare a brief analysis (about two paragraphs) that highlights how these positions.
What can we do as a business when we need images : What can we do as a business when we need images? What can we do in an academic setting when we need images or graphics to create a compelling.
Prepare a schedule showing the intangible asset : Prepare a schedule showing the intangible asset section of Jane's December 31, 2011, balance sheet
Use pointers to implement our own vector class : 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.
Legal dispute between pi and a customer : Identify the name of the Maryland state court that has jurisdiction to hear a legal dispute between PI and a customer regarding an in-state transaction.
Compute average collection period for accounts receivable : Compute average collection period for accounts receivable and Accounts receivable turnover (For VF, use "Net sales" and assume all sales were credit sales).
Observe and analyze from marketing perspective : Select a healthcare organization to observe and analyze from a marketing perspective.
Example of a specific maryland law : Identify and summarize an example of a specific Maryland law that is important and would regulate business operations, and/or might restrict.

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