[CSUSB]
>> [CNS]
>> [Comp Sci Dept]
>> [R J Botting]
>> [CSci620]
>>
lab09
[Source]
Goal: Study how a data type was defined in a language like Pascal or C.
Process: Work in pairs:
| Header | Specification |
|---|---|
| int initialize(); | Afterwards no character can be obtained from table. Note. Do not use to empty the table: it does not collect the garbage. |
| int obtain(char ch); | Finds and returns the integer associated with the first character to match. If no character matches it prints and error message and retruns the value of constant ERROR. |
| int add(char ch, int i); | Places the pair (ch, i) into the table. If ch is already in the table both pairs are stored afterwards. |
| int remove(char ch); | Removes the first pair (if any) that matches the character ch. If there is no such pair, it does nothing. |
| int print(); | This is a debugging tool. It lists each pair stored in the table, in the order in which they are stored. |
Deliverable: Show me your remove procedure before the end of the lab. The score will be based on completeness, correctness, following the Pascal paradigm, and simplicity. Each pair-programming team gets 100% of the allocated points.