Closed barrylyung closed 4 years ago
Currently in class without access to my laptop so I’m unable to push until 3:30ish. We have classes for primitive types and strings. Assume that each subclass inherits the same methods as our array class with the return type for methods like get changing accordingly
Can you point to where the professors confirmed this? Is there a piazza post?
Jan Vitek told us in person. We are only allowed to implement things that are specified in the spec
Pushed the new classes. Let me know if something seems off. We've decided on our insert/add functionality. The user is only allowed to use insert between indices 0 and length-1. In order to expand the array, the user must use append when there is an item occupying the last item in the array. Append works by keeping track of the biggest index that currently exists and inserting directly after. In a situation where theres an empty index of size 10 and we insert an item at index 9, calling append() would expand the array to size 20 and insert the new item at index 11. We feel like this is the simplest implementation that doesn't involve shifting indices and we are not allowing arrays to shrink.
We will update the tests accordingly now
Hey, thank you for adding the array subclasses. Unfortunately, the method stub- virtual void get(size_t index), in parent Array class, will not be able to be overridden by the child methods- int get(size_t index), bool get(size_t index), etc... that you have given us. We talked to Jan earlier today about this overriding issue and he suggested that you remove the virtual void get(size_t index) from the parent class (Array) entirely and only keep the child class methods.
resolved
In main.cpp, you reference to StringArray, IntArray, BoolArray, FloatArray. However, in your spec, you do not include any class or method stubs to these classes. Please update so we can continue.
Profs have confirmed that these must be provided within the spec if they are included within the tests.