Design and implement a name_pairs class

Assignment Help Basic Computer Science
Reference no: EM131395673

Design and implement a Name_pairs class holding (name,age) pairs where name is a string and age is a double. Represent that as a vector (called name) and a vector (called age) member. Provide an input operation read_names() that reads a series of names. Provide a read_ ages() operation that prompts the user for an age for each name. Provide a print() operation that prints out the (name[i],age[i]) pairs (one per line) in the order determined by the name vector. Provide a sort() operation that sorts the name vector in alphabetical order and reorganizes the age vector to match. Implement all "operations" as member functions. Test the class (of course: test early and often).

Reference no: EM131395673

Questions Cloud

Create functions for returning those data values : Create functions for checking a book in and out. Do simple validation of data entered into a Book; for example, accept ISBNs only of the form n-n-n-x where n is an integer and x is a digit or a letter. Store an ISBN as a string.
Quality of textbooks increased dramatically : Professors required each student to buy 10 notebooks, regardless of the price. The quality of textbooks increased dramatically from 2014 to 2016, with textbook companies bundling new online study aids with their books, but this quality change is h..
Whether definitions are stipulative or lexical - femikin : Determine whether the following definitions are stipulative, lexical, precising, theoretical, or persuasive.- "Femikin" means a female manikin.
What is monopolistic about monopolistic competition : 1. Give examples of industries that are monopolistically competitive. Find the news articles, books which explain these examples. 2. What is "monopolistic" about monopolistic competition? What is "competitive" about a monopolistically competitive..
Design and implement a name_pairs class : Provide a sort() operation that sorts the name vector in alphabetical order and reorganizes the age vector to match. Implement all "operations" as member functions. Test the class (of course: test early and often).
Should the united states maintain its position : The United States has maintained its stance. Should governments anywhere, all with imperfect human-designed and human-run justice systems, take human life? Should the United States maintain its position
How does your program deal with boundary conditions : COMP 2103X1- Does you program "blow up" on unexpected input, or does it deal with bad input in a "graceful" way? How does your program deal with boundary conditions, if there are any?
Describe how a change in the exchange rate affected : Question One: Using shifts in supply and demand curves, describe how a change in the exchange rate affected your industry in a hospital setting. Label the axes, and state the geographic, product, and time dimensions of the demand and supply curves..
Whether definitions are stipulative or lexical - sound : Determine whether the following definitions are stipulative, lexical, precising, theoretical, or persuasive.- "Sound" means a compression wave, in air or some other elastic medium, having a frequency ranging (for humans) from 20 to 20,000 vibration..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write the sql query to return all of the information

Write the SQL query to return all of the information

  Identify if it is a file- directory

Examine the following list of permissions for four items included in a directory listing. Identify if it is a file, directory, or other. Specify the access allowed to listening.

  Compare the unstandardized and standardized coefficients

Reanalyze the final nonrecursive model of turnover intention (see Figure 14.2 for the initial model) by constraining to equality the direct effects of the feedback loop. Compare the unstandardized and standardized coefficients.

  Determining the capital gains yield

What would your capital gains yield have been if you had purchased this stock one year ago and then sold the stock today?

  Determine why that happens by closely examining your code

You may have noticed that for some runs, ga terminates with an error that the nonlinear constraint file is not returning a real value. Determine why that happens by closely examining your code. How would you fix this issue? Subsequently, re-run the g..

  Make it on platform research on hypervisors

Assignment is done already but the proposal is for a hypervisor - ie: Hyper-V, VMWare, FreeBSD Jail, etc... Which has been done but there is no supporting evidence for that platform.

  Explain the strength and weaknesses of sdlc models

1. Explain the strength and weaknesses of SDLC models? 2. Define the term object-oriented analysis and design.

  How multiplication works in twos-complement form

Consider carefully how multiplication works in twos-complement form. In the worst case you will need circuitry to convert one or both operands to positive values and then adjust the result sign after it has been computed.

  What tasks are performed by the transport layer

What is the major function of the network access layer?

  Perform a large number of experiments easily

Automate the process so that you can specify and perform a large number of experiments easily.

  Create a worksheet for the assistant director of athletics

In this project, you will create a worksheet for the Assistant Director of Athletics at Laurel College to analyze the available sports programs.

  Managing the development of large software systems

Write paper on managing the development of large software systems

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