Write a cpp program that will declare a vector of integers

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

Assignment

This is the program:

This program will use 2 different data structures to perform the same tasks; a vector and a dynamically sized array

Write a complete C++ program that will: Declare a vector of integers with no specified size

Use a pointer to dynamically allocate an array of 10 integers Inside a loop:

Present the user with a menu with the following choices: Output all values to the screen

Add data values from a file

Add a new data value from the keyboard Remove a data value

Sort the data

Quit

Have the program perform the chosen menu option and then repeat the menu until the user chooses to quit.

Perform all operations (input, output, sort, add, remove) on both data structures.

Output: show 10 values per line with regular spacing

Add from keyboard:

Ask the user for an integer value.

Search the data structure (either one) for that value

If the value is NOT already in the data structures, then add it to both If the value is already in the data structures, do nothing

Add from file:

Ask the user for the name of the input file, and open that file Read all of the values from the file into both data structures Duplicate values should not be stored

Remove a value:

Ask the user for an integer value

If the value is found in the data structures, remove it from both If the value is not currently in the data structures, do nothing

Sort: sort the data in both data structures from small to large

All of the major array operations must be done in functions.

If vector operations take more than one or two lines, they should also be done in functions.

Name block and function comments are required as usual.

Reference no: EM131324240

Questions Cloud

What is the probability that you can toss some number : What is the probability that you can toss some number, n, heads in a row? The idea here is to calculate the probability of trials that had all heads, such that a trial constitutes a set number of coin tosses.
What goal do the paris agreements set for temperature : What goal do the Paris agreements set for the global temperature? According to the sources in the article, how likely is it that we'll achieve this goal? Why
The price-quality and service compare at different stores : While evaluating alternatives, all of the following are appropriate questions you could ask before making a major purchase except. Is it possible to delay the purchase or to do without the item?  Should I pay for the item with cash or buy it on credi..
Explain how you would create a synthetic stock position : Explain how you would create a synthetic stock position and identify the cost. Suppose you observe a $100 stock price, identify any arbitrage opportunities.
Write a cpp program that will declare a vector of integers : CPSC P#9- Write a complete C++ program that will: Declare a vector of integers with no specified size. Use a pointer to dynamically allocate an array of 10 integers Inside a loop:
Evaluate the august 165 puts and calls : Evaluate the August 165 puts and calls, and recommend a conversion or a reverse conversion. Determine the profit from the transaction if the options are held to expiration.
Find the initial speed of the van : A(n) 2655 kg van runs into the back of a(n) 848 kg compact car at rest. They move off together at 8.8 m/s. Assuming no friction with the ground, find the initial speed of the van
Determine the profit equations for the given strategies : Determine the profit equations for the following strategies, assuming that the options are held to expiration and exercised if in-the-money rather than sold back.
Declare the variables needed to solve the problem : A typical program flow would declare the variables needed to solve the problem, initialize the variables, solicit input, perform the data manipulation and/or calculations and display the result.

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