1. Add preconditions to the methods __getitem__ and __setitem__ of the Array class. The precondition of each method is 0 <=><>
2. Add the methods grow and shrink to the Array class. These methods should use the strategies discussed in this chapter to increase or decrease the length of the list contained in the array. Make sure that the physical size of the array does not shrink below the user-specified capacity and that the array’s cells use the fill value when the array’s size is increased.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here