dynArrSetCapacity

A revised version of the dynArrSetCapacity function for assignment 2.