Lecture 21 - April 5, 2007
We talked about
Lab 22
- using the comparable interface
- that there were two (2) different sort
methods you were asked to use
- one (1) you wrote yourself
- (remember: bubble sort, insertion
sort, selection sort)
- Arrays.sort
- deadline was extended for those in
class who asked for it til 6pm today
We talked about
Lab 10 - the Fraction class
- common denominator is just the product
of the denominators
- it is necessary to check for a
denominator of 0
- setting denominator to 1 is not a good
solution when it's found
- printing a error message and
returning a 0 is fine
- it is necessary to check for negative
numbers when reducing fractions
- if you use the absolute value of the
numerator and denominator, it's the same as reducing fractions in which
the numerator and denominator are both positive
- it is not adequate to only test for
common factors of 2 and 3
- it is adequate to check for common
factors up to the square root of the absolute value of the smaller of the
numerator and denominator
We went through
slides for array material (Chapter 8 in our text book)
- link to my slides with notes (we
went through 1-13 in class - going through the remaining slides or reading
the chapter material will help you with Monday's lab (there are only 21)
- link to Gaddis slides (he has
70+)
- the CD that came with your text has
the code that is referenced in his slides and mine.
Happy Easter!