University of Calgary

vector class

Vector Class
created by: Jared Hopf 2003

Description:

The purpose of this assignment is to design a class for a three dimensional vector.  Vectors are very useful in a variety of areas of computer science, like Graphics, Simulations, and  Numerical methods,  As well, vectors are useful for physics problems, math/calculus problems and other areas.
The vector class should have the following operations:
setting the vectors values.  
Adding one vector to another.
Subtracting one vector from another.
Scaling the vector by a scalar.
Normalizing the vector.
Length of a vector.
Dot Product of two vectors.
Cross product of two vectors. ( 3D vector only )
Distance between two vectors.

Minimum Requirements:

Basic class that does the operations for a three dimensional vector.

Additional/Optional requirements:

N-Dimensional Vector class.
Other vector operation options not listed

Concepts:

Basic Class design (Polymorphism, Encapsulation, JAVA: Class methods, Clone/Copy constructor, etc.)
Arithmetic operations.
Conditional checking.


Updated: August 5, 2005 06:45 PM