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

  Create a batch script file and save it

Write a pseudocode statements for my script. I wrote the script but it doesn't work when I copy and paste it into the CLI.  I'm supposed to create a batch script file and save it but I'm not sure of how to retrieve it from the CLI because I'm not sur..

  How far will the object have fallen after twelve seconds

Physics If an object starting at rest falls in a vacuum near the surface of Earth, it will fall 16 feet during the first second, 48 feet during the next second, 80 feet during the third second, and so on.

  Write the definition of the function

Write the definition of the function, nodeCount, that returns the number of nodes in a binary tree. Add this function to the classbinaryTreeType and create a program to test this function.

  For the term lambdax x lambday y write down the type of

1 beta-reductiona underline the free variables in the term lambday x. x y a. a x b beta-reduce that term to its normal

  Describe proper communication techniques

Summarize the process of addressing prohibited content/activity, and explain privacy, licensing, and policy concepts. Describe proper communication techniques and professionalism when working with users.

  Expected future improvements in networking technologies

Should Consolidated Supplies replace all the networking equipment in all the warehouses now, should it wait until newer networking technologies are available, or should it upgrade some of the warehouses this year, some next year, and some the year..

  Why the strategy for storing check constraint values

Explain why the strategy for storing CHECK constraint values in a separate table is better than implementing them in a table-based constraint. How can this strategy be used to implement the constraint on ARTIST. Nationality?

  What are the commands that are used

What are the commands that are used to copy an object in Python?

  Peoples behavior without influencing it

Is it possible to study peoples' behavior without influencing it? Give two examples on how you would accomplish this and explain why you think people would not be influenced.

  Write a formula for the area of the segment

A segment of a circle is the region bounded by an arc and its chord. Consider any minor arc. If is the radian measure of the central angle and r is the radius of the circle, write a formula for the area of the segment.

  Explain forms-based-authentication

Discuss authorization and authentication and explain forms-based-authentication. Describe the use of the ControlToValidate, Validation expression, ErrorMessage, and Enabled properties of a validation control.

  Value of th edifference between num

Write a return method named from Ten that returns an integer. fromTen takes in one parameter oftype integer named num. fromTen will return the absolute value of th edifference between num and 10. Do not write a Class, just a Method.

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