Outline for Chapter 9 Review
From Huben's Wiki
(Created page with "*Create new classes. ** Write class headers. *Fields ** public versus private ** static or not *Constructors ** write headers ** default no-args constructor ** copy constructor *...") |
|||
Line 24: | Line 24: | ||
** overloaded (constructors and methods) | ** overloaded (constructors and methods) | ||
** promotion | ** promotion | ||
+ | ** variables of object types hold references to the objects | ||
** passing by reference versus value | ** passing by reference versus value | ||
** this | ** this | ||
Line 31: | Line 32: | ||
* a variable tracking how many points are created | * a variable tracking how many points are created | ||
* no-args, two arg and copy constructors | * no-args, two arg and copy constructors | ||
− | * a method that adds the two coordinates together | + | * a method named taxicab that adds the two coordinates together into a single real number |
− | * a method that adds two points together | + | * a method named plus that adds two points together to make a new point |
* a toString method that would print like this: (1.3, -2.7) | * a toString method that would print like this: (1.3, -2.7) | ||
* a main that tests all these | * a main that tests all these |