|
|
||
| You are here: | ||
|
Implements the Fraction2 Class which illustrates the use of accessor, mutator and helper methods.
Use set (mutator) methods instead.
use the new simplify helper method.
mutator methods
A new simplify method.
Every Java Class descends fron Class Object, therefore every Java Class has a toString() method, whether you can see it or not. See Inheritance in Topic 5. |
/** /** Related: [ Java Home | classes page ] |
Modified from Fraction |
|
|
|||
|
Questions or problems related to this web site should be addressed to Richard Jones who asserts his right to be identified as the author and owner of these materials - unless otherwise indicated. Please feel free to use the material presented here and to create links to it for non-commercial purposes; an acknowledgement of the source is required by the Creative Commons licence. Use of materials from this site is conditional upon your having read the additional terms of use on the about page and the Creative Commons Licence. View privacy policy. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. © 2001 - 2009 Richard Jones, PO BOX 246, Cambridge, New Zealand; This page was last modified: May 31, 2009 |