Question 13
Consider the definition of the object datatype ClassDict.
ClassDict private fields: Dict, keys private procedures: Procedure isKey(D, k) foreach i in keys(D) { if (i == k) { return (True) } } return (False) End isKey public procedures: Procedure initialize( ) Dict = { } keys = [ ] End initialize
Procedure addElement(key, value) if (not isKey(Dict, key)) { Dict[key] = value keys = keys ++ [key] } End addElementEnd ClassDictLet cD be a ClassDict object. Choose the correct statement(s) based on the definition of ClassDict. It is a Multiple Select Question (MSQ).
cD.initialize cannot be called directly.
cD.Dict, cD.keys cannot be updated directly.
Many objects like cD of datatype ClassDict can be created.
The procedure addElement returns Dict.