Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Java Program Specification: 1. Read data for names and weights for 15 people

ID: 3591070 • Letter: I

Question

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

Explanation / Answer

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

Person.java

// Simple person class encapsulating the idea of a person as including a name and <a href="#">weight</a>.*

PersonLinkedListTest.java

}
For doubly linked list that is inserting by weight in ascending order. But somehow I need to set the previous pointer so that it is always pointing to the next node in alphabetical order. I can't call a sort on the weight doubly linked list so what would I need to change so that the previous pointer always points to the next node in alphabetical order and the next pointer always points to the next node by weight in ascending order?

private String name;
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote