Lecture 25 (Tychonievich) - Classes part 1

Lecture Date: Wednesday, March 18

We did a first look at methods today, going quickly over a lot of material. We’ll go more slowly looking under the hood next class.

From Lecture

We created the following:

Fraction
// fields - describe state
- numerator : int
- denominator : int
// methods - describe behavior
+ asDouble() : double
+ add(Fraction) : Fraction // use as someFraction.add(someOtherFraction);
+ isARealNumber() : boolean
+ toString() : String