User Tools

Site Tools


assignments:a2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
assignments:a2 [2009/04/02 03:03] jonathanassignments:a2 [2009/04/05 02:11] (current) – removed jonathan
Line 1: Line 1:
-====== Assignment 2 ====== 
- 
- 
-Download the file a2-money.zip in ''Assignments'' in the SVN. Instructions are in the PDF file ''W09-a2-money-spec.pdf''. 
- 
-Since your code will be executed and checked with a script, you must follow the instructions precisely. Your work is in a directory ''a2-money'' (with ecf file as is, in this folder). You must do a written report which you must include in this directory. 
- 
-Before submitting, eclean and do a fresh compile and execute to make sure that you get a green bar. Then eclean the directory ''a2-money'' again (to get rid of the EIFGEN's) and submit it: 
- 
-   submit -l 3311 a2 a2-money 
- 
-Don't forget to also hand in your written report at the 3311 drop box in the CSE building. 
- 
----- 
- 
-===== void safety and HASH_TABLE [?G, ?K]===== 
- 
-We would like to use HASH_TABLE[G, H] to implement the efficient version of MAP when we can rely on hashable keys. Eiffelstudio 6.3 is in transition to implementing void safety (which means that the compiler will always catch errors of the type ''t.f(x)'' where ''t = Void''). As part of the transition, a type with a question mark in front of it (?T) is detachable (allowed to be Void) whereas a type with a question mark (!T) is an attached type (is never allowed to be void). 
- 
-The latest version of HASH_TABLE inherits from TABLE [?G, ?K], i.e. the generic parameters are allowed to be attached to Void. So, to use HASH_TABLE in HASHABLE_MAP, we can proceed as follows: 
- 
-<code eiffel> 
-class MAP 
-end 
-</code> 
- 
- 
  
assignments/a2.1238641436.txt.gz · Last modified: 2009/04/02 03:03 by jonathan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki