to write a class that encapsulated operations of a vector.
Internally it had to be an integer array and have operations like insert(), delete(), find(), erase(), and so on.
so it was an arbitrary yet a fairly common exercise on class encapsulation, as well as testing knowledge of array manipulation. Naturally in a real life situation one could and perhaps should use a Vector construct.
My main point of bewilderement was that when learning about Computer Science, one has to have a decent knowledge of how computers actually store data, and operate on that data. An array is one of the basics. I could understand CS-I students not knowing this concept well enough yet. However, when CS-II students at the end of their course did not know this, it sent me into a state of bewilderement. |