Java Reference
In-Depth Information
13. To test a class, use an environment for interactive testing, or write a tester class
to execute test instructions.
14. Instance fields belong to an object. Parameter variables and local variables
belong to a methodȌthey die when the method exits.
15. Instance fields are initialized to a default value, but you must initialize local
variables.
16. The implicit parameter of a method is the object on which the method is
invoked. The this reference denotes the implicit parameter.
17. Use of an instance field name in a method denotes the instance field of the
implicit parameter.
18. It is a good idea to make a class for any part of a drawing that that can occur
more than once.
19. To figure out how to draw a complex shape, make a sketch on graph paper.
123
124
FURTHER READING
1. http://verifiedvoting.org A site with information on voter-verifiable voting
machines, founded by Stanford computer science professor David Dill.
REVIEW EXERCISES
΢ Exercise R3.1 Why is the BankAccount(double
initialBalance) constructor not strictly necessary?
΢ Exercise R3.2 Explain the difference between
BankAccount b;
and
BankAccount b = new BankAccount(5000);
΢ Exercise R3.3 Explain the difference between
new BankAccount(5000);
Search WWH ::




Custom Search