Further Examples: Money

What is money?

What is the essential information a program needs to know about money? How can these be represented as fields in a Money class?

Is this the only way to represent Money?

What should the constructor for Money look like?

Do you need any getter or setter methods? (Can money change its state or should it be immutable?)

What do you want to do with money? What methods should you write?


Previous | Next | Top | Cafe au Lait

Copyright 1997-1998, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified April 6, 2006