CPTR-241 Homework #6 for Wednesday 1/24/18
1) Re-write the "Try This 5-1 Bubble Sort" program on page 141 of
the text to sort an array of strings. String zero in the array
should end up having the shortest string and the highest numbered
string should end up with the longest string. The program needs to
print out the original set of strings before sorting and then
print them out again after printing. You can hardcode the strings
into your program. There should be 6 strings or more.
From this day forward you are required to have a "header" at the
top of any source code that includes these items: class, assignment number,
date, your name, short problem description. If the program depends
on a data file or other resource being available that should be
identified as well (some programmers would put this information
under a label of input). A category of output can be helpful
if the program is sending data to more than just the local screen.
Note that the assignment is to write your own code for this rather
than possibly finding a method in a library or some other persons
code to do this.
2) On Wednesday we will look at Chapter 6 material, i.e. Access
Modifiers, Passing Objects to/from methods, and Method Overloading.
Thus reading in Chapter 6 is appropriate.
Larry Aamodt PhD, PE
Professor of Engineering and Computer Science
Walla Walla University
Contact:
via email: AamoLa (at) wallawalla.edu
via phone: x2058