Present the user with a menu with the given choices

Assignment Help Programming Languages
Reference no: EM131324288

Assignment- Object Oriented Programming

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: EM131324288

Questions Cloud

Estimates of theoretically correct volatilities of stocks : You note that the implied volatility of a particular option is substantially higher than the theoretical volatility. What action should you take?
Can implied volatilities be expected to vary for options : Can implied volatilities be expected to vary for options on the same stock with the same exercise prices but different expirations?
Compute the blackscholes merton price of the call : What factors contribute to the difficulty of making a delta hedge be truly risk-free? A stock is priced at $50 with a volatility of 35 percent.
Examine the underlying historical and economic reasons : Examine the underlying historical and economic reasons behind the quest for alternatives to incarcerating offenders in jails and prisons.Describe three (3) alternatives to incarceration that juvenile courts currently use. Provide examples of such ..
Present the user with a menu with the given choices : CPSCI 121 - Object Oriented Programming: 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.
Firm achieve in order to meet its growth rate goal : Fulkerson Manufacturing wishes to maintain a sustainable growth rate of 9.25 percent a year, a debt–equity ratio of .50, and a dividend payout ratio of 27.5 percent. The ratio of total assets to sales is constant at 1.25. What profit margin must the ..
Describe overall impact of utilizing information technology : Describe the overall impact of utilizing information technologies in combatting digital crime and digital terrorism. Explain the existing challenges that result from the independent nature of the law enforcement agencies within the U.S. with regar..
Financial records-what is return on assets : A fire has destroyed a large percentage of the financial records of the Excandesco Company. You have the task of piecing together information in order to release a financial report. You have found the return on equity to be 15.1 percent. What is the ..
How various areas of your figure correspond to the equation : Indicate how the various areas of your figure correspond to the equation derived in Appendix 9A.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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