class Vector { private: double i, j, k; public: // creates a vector containing 0i + 0j + 0k Vector (); // creates a vector with specfied i, j and k coefficients Vector (double i, double j, double k); // returns magnitude of vector double magnitude () const; // returns dot product of vector and another vector // (returns vector . other vector) double dot (const Vector &otherVector) const; // returns cross produce of vector and another vector // (returns vector X other vector) Vector cross (const Vector &otherVector) const; // adds another vector to a vector // (returns = vector + other vector) void add (const Vector &otherVector); // converts a vector to a unit vector while preserving its direction. // throws a domain_error exception if the vector has magnitude zero. void unitize (); // reads a vector (i, j, and k) from the given input stream void read (istream &is); // writes a vector to the given output stream in format "i"i + "j"j + "k"k void write (ostream &os); };