Create an object/Native demonstration: Difference between revisions

Clarified task wording
(Added C++ implementation)
(Clarified task wording)
Line 1:
{{draft task}}
 
Create a Hash/Associative Array/Dictionary-like object, that can be initialized with some default key/value pairs using the languages native method of object creation. The object should behave like a native Hash/Associative Array/Dictionary of the language, if any, but with the following differences:
 
* No new itemkeys can be added;
* Keys cannot be removed;
* Item cannot be deleted, (but native delete method may used to reset the item's value to default) ;
* A key can be reset its original initialized value.
 
If the language supports '''Magic Methods''', then show how these work.
 
=={{header|C++}}==
125

edits