|
Computer Science (CSCI)
Department |
|||
|
|||
Designing Classes
(Example code and figures from Computing Concepts with Java Essentials, 3rd
edition, by Cay Horstmann.
Visit www.wiley.com/college/horstmann
for information on the current edition of this excellent text.)
Choosing Classes
Cohesion
public class Purse |
public class Coin |
Coupling


Accessor and Mutator Methods
Preconditions
/** |
Postconditions
/** |
class Numeric |
if (Numeric.approxEqual(a, b)) . . . |
Static Variables
public class BankAccount |
A Static Field and Instance Fields
Scope
public class Coin |