Question: USING C + + and PLEASE COMMENT Program Specification: 1 . Read data for names and weights for 1 5 people from the console where
USING C and PLEASE COMMENT
Program Specification:
Read data for names and weights for people from the console where there is a name on a line followed by a weight on the next line, like in names.txt
Your program will build a list for the data maintained in ascending order based on both name and weight via a doubly linked list.
This dll will use one pointer to keep weights in sorted order, and use the other link to keep names on sorted order.
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 elements are added for Name Weight:
Michael Tom Abe
Output:
Names & weights sortedascending by name. : Abe Michael Tom
Names & weights sortedascending by weight. : Tom Abe Michael
Sample Test Data:
Mark
Tina
Zach
Amy
Steve
Brian
Liz
Brian
Laura
Alex
Jason
Eric
Aaron
Kim
Brandon
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
