Next: Modifers and functions
Up: Rational numbers
Previous: Rational numbers
- Write a second constructor for your class that takes two
arguments and that uses them to initalize the instance
variables.
- Add lines to main that test both constructors. You will
probably want to add a print statement to the constructors so that
you can tell exactly when each constructor gets invoked.
Allen Downey
Thu Sep 7 11:50:06 EDT 2000