Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Help Program Specification: 1. Read data for names and weights for 15 people from the console where there is a name on a line

C++ Help

Program Specification:

1. Read data for names and weights for 15 people from the console where there is a name on a line followed by a weight on the next line, like in names.txt. 2. Your program will build a list for the data maintained in ascending order based on both name and weight via a doubly linked list. 3. This dll will use one pointer to keep weights in sorted order, and use the other link to keep names on sorted order. 4. You need to build the list as you go maintaining this ordering, so at any time a print method was called it would print the related field in order. (This means nodes are added to the list in sorted order, elements are not added to the list followed by a sort called on the list.)

For example after 3 elements are added for (Name Weight): Michael 275, Tom 150, Abe 200.

Output: Names & weights sorted(ascending) by name. : Abe 200, Michael 275, Tom - 150 Names & weights sorted(ascending) by weight. : Tom 150, Abe 200, Michael - 275

Grading: Well-Formatted Correct Output: 10% Correct Algorithm/Design: 80% Good self documenting / commented code & Readability (This should be easy points) 10%

names.txt

Jim 150 Tom 212 Michael 174 Abe 199 Richard 200 April 117 Claire 124 Bobby 109 Bob 156 Kevin 145 Jason 182 Brian 150 Chris 175 Steven 164 Annabelle 99 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions