[prev] [index] [next]

Example: Point ADT (cont)

Comparison of PointDT and PointADT
  • PointDT vars dynamically allocated in C stack
  • PointADT vars dynamically allocated in the heap
  • PointDT combines definition and creation
  • PointADT combines creation/initialisation
  • PointADT client sees only a pointer
  • PointADT can change with no effect on client
  • PointADT requires explicit memory management (free)