
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Part I: Print out the two arrays: (Be sure to do this first) Anne 30 Bob 150 Ralph 305 Tim 225 Barbara 135 Jane 160 Steve 80 Tom 200 Mike 165 Shirley 90 Pam 100 Frank 120 Part II: The elevators in our building have an 1100 lb. load limit. Determine which people in the list above get on the elevator. Print their names, weights, total weight, and how many got on. Part III: Rearrange these people in ascending sequence by weight and print the two arrays. Determine again how many may ride the elevator, printing out their names, weights, total weight and the number of how many people got on. Part IV: Rearrange these people in ascending sequence by name (USE A DIFFERENT SORT ALGORITHM THAN THE ONE YOU USED IN PART II) and print the two arrays. Determine again how many may ride the elevator, printing out their names, weights, total weight and the number of how many people got on. Part V: Have the program determine which method allowed the most people to get on the elevator. Turn in an algorithm for main, source code, and output. NOTE: You may hard code the data into the arrays and print the answers on the screen Extra Credit: Code as an object-oriented program: design a class, called People, that includes a person’s name and a weight with a constructor, 2 getter methods, and a toString() method. design a second class, called PeopleList (like the IntegerList lab) that has an array of People, and methods to construct a list of a given size, add to a list, print a list (toString() method) turn in a UML (no algorithm needed), source code, and output.