Modify the Array
class so that it monitors the objects that are added to ensure that they are of the expected type. (Hint: Class.isInstance
)
Generate an assertion failure when the type is not correct, or when an index is out of bounds, or an enumeration was used incorrectly.