CPSC 333: Definition of ``Currency''

Location: [CPSC 333] [Assignments] [More about Problem to Model for Question #1 on Assignment #2]


Question:

In the data dictionary provided for assignment 2 you define currency as being of type real and then describe it as representing a ``positive'' amount of money. Should we change this to ``positive or negative'' in order to handle withdrawals, negative balances etc..?

Answer:

This was my mistake - Sorry! It makes much more sense to allow ``currency'' to be zero or negative, as well, for the reasons you suggest.

I've corrected the data dictionary definition for ``currency'' (removing the requirement that the amount be positive), in the online notes.


Department of Computer Science
University of Calgary

Office: (403) 220-5073
Fax: (403) 284-4707

eberly@cpsc.ucalgary.ca