Preparing for Exercise 6.23
Exercise 6.23 calls for you to write these procedures:
- 3D-vector-add
- 3D-vector-dot-product
- 3D-vector-scale
These procedures must use a 3D-vector abstract data type (ADT)
consisting of the following procedures in its interface:
- make-3D-vector
- x-coord
- y-coord
- z-coord
- 3D-vector-equals
While writing the 3D-vector-add, 3D-vector-dot-product
and 3D-vector-scale procedures requires
you to use the 3D-vector ADT procedures, it does not require
any knowledge of how they are implemented.
However, to test 3D-vector-add, 3D-vector-dot-product
and 3D-vector-scale we
need an implementation of the 3D-vector ADT.
Your job:
- The preliminary exercise for Exercise 6.23 calls for you to write
make-3D-vector, x-coord, y-coord, z-coord,
and 3D-vector-equals
- Exercise 6.23 calls for you to
write 3D-vector-add, 3D-vector-dot-product,
and 3D-vector-scale using the 3D-vector
ADT