Make any improvements you might deem appropriate to the class of vectors. You might be helped in this task by the following list.
• The assertions for the round bracket operator are almost identical to those of the square bracket operator and those of the Read method. Rewrite the Read method and one of these operators in such a way that they call the remaining operator (with a suitable offset, as necessary) and all the checks are given in one place.
• There are many assertions in the class as it stands. These mean that it is very easy to write programs which terminate with a run–time error. Can you turn any of the assertions into exceptions or warnings (see Chap. 9)?
• Write an output operator for vectors using the pattern given in Sect. 6.4 for the operator