Docsity

CSE 1301 Project #5: Elevator Capacity, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
**************************************************
CSE 1301 Project#5
Due: Wednesday July 22, 2009
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.

Partial preview of the text

Download CSE 1301 Project #5: Elevator Capacity and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

CSE 1301 Project#

Due: Wednesday July 22, 2009

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.