Question

Write a class to represent vectors in spherical coordinates. The class should have 3 attributes - the r, 0,

and components. The class should have:

1) Accessor methods that allow the users to get and set (if necessary) each of these attributes.

2) The magic method (or dunder method)_str_that returns the string format of the object and

is used by the str and print functions. As a note, the Greek symbols for 8 and can be used in

the print-statement using the Unicode characters '\u03B8' and \u03C6', respectively.

3) Methods dot and crossproduct that will compute the dot product and cross product of two

vectors, respectively. As a note, the typical vector operations of a dot product and cross product

are only valid for vectors in Cartesian coordinates, so the methods must first convert each

vector from its spherical representation to cartesian representation, perform the vector

operation, and then convert the final result to spherical coordinates (conversion to spherical

coordinates only necessary for cross product).