Differences

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

Link to this comparison view

dss:assignment [2019/04/23 14:22]
eduard.staniloiu
dss:assignment [2020/05/03 22:42] (current)
eduard.staniloiu [Testing and grading]
Line 5: Line 5:
  
 ^ Method ​            ^ Description ​                                                ^ ^ Method ​            ^ Description ​                                                ^
 +| this(size_t initialLength);​ | a constructor that takes the initial size of the hashtable |
 +| size_t length(); | returns the size of the hashtable |
 | void add(string word); | add a new word to the hashtable, or increase the number of occurrences | | void add(string word); | add a new word to the hashtable, or increase the number of occurrences |
 | void remove(string word); | remove the word from the hashtable; the word doesn'​t necessarily have to exist | | void remove(string word); | remove the word from the hashtable; the word doesn'​t necessarily have to exist |
 | size_t get (string word, size_t defaultValue = 0); | return the number of occurances for the given word, or defaultValue if the word doesn'​t exist in the hashtable | | size_t get (string word, size_t defaultValue = 0); | return the number of occurances for the given word, or defaultValue if the word doesn'​t exist in the hashtable |
-| void clear(); | clear the table |+| void clear(); | clear the table|
 | void resizeDouble();​ | double the size of the hashtable | | void resizeDouble();​ | double the size of the hashtable |
 | void resizeHalve();​ | halve the size of the hashtable. Excess memory must be freed. | | void resizeHalve();​ | halve the size of the hashtable. Excess memory must be freed. |
Line 14: Line 16:
 | string toString(); | returns a string containing all the pairs <word, numOcc> in the hashtable, starting with index 0 | | string toString(); | returns a string containing all the pairs <word, numOcc> in the hashtable, starting with index 0 |
  
-The implemented hashtable will contain SIZE buckets. Each bucket will contain a pair consisting of the word and number of occurrences.+The implemented hashtable ​must be named **Hashtable** and it will contain SIZE buckets. Each bucket will contain a pair consisting of the word and number of occurrences.
  
 ===== Implementation details ===== ===== Implementation details =====
Line 55: Line 57:
 ===== Testing and grading ===== ===== Testing and grading =====
  
-The assignment must be submitted as a `.zip` archive on VMChecker. The archive must have the following naming convention: **firstName-lastName.zip**. The archive will contain the `hashtable.d` and `dmd_setup.sh` files.+The assignment must be submitted as a `.zip` archive on [[https://​vmchecker.cs.pub.ro/​ui/#​DLANG|VMChecker]] for the `DLang` course. The archive must have the following naming convention: **firstName-lastName.zip**. The archive will contain the `hashtable.d` and `dmd_setup.sh` files.
  
 The final grade will consist of: The final grade will consist of:
dss/assignment.1556018555.txt.gz ยท Last modified: 2019/04/23 14:22 by eduard.staniloiu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0