Question: Here is Map's hasKey operation function header and contract: Boolean hasKey (K& key); //! restores self, key //1 preserves key //! ensures: hasKey= (key is
Here is Map's hasKey operation function header and contract: Boolean hasKey (K& key); //! restores self, key //1 preserves key //! ensures: hasKey= (key is in DOMAIN(self)) hasKey returns the value true to the client program when: O the parameter key is not found in the current map's set of defined domain values O the parameter key is found in the current map's set of defined domain values O the parameter key is found in the current map's set of defined range values when key is not unique among all the domain values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
