Provide a sort operation that sorts the name vector in


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).

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Provide a sort operation that sorts the name vector in
Reference No:- TGS02192317

Expected delivery within 24 Hours