3.1 Operations and values

What do we want to do with a student record? We may want to read one from a file, and write one to a file. We may want to access the name as a whole, or access individual portions of the name. We may want to access the student number. We may want to let a student change his/her password and etc.

Traditionally, accesses to an ADT are divided into two categories. Operations are actions that can be performed with an ADT object, and values are attributes (or properties) in an ADT object that can be read or rewritten.

In our example, operation includes:

And values include:



Copyright © 2006-09-07 by Tak Auyeung