Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P project02
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cs2-19wi
  • project02
  • Issues
  • #6

Closed
Open
Created Jan 05, 2019 by Julia R. Reisler@jreislerDeveloper

Words in dictionary have to be sorted for tests to pass

When I originally started this set for RandomHangmanChooser, I was using a HashSet to store words after reading them in from the text file. However, unless the words are sorted alphabetically, the tests for the full game fail since choosing a word pseudorandomly from a SortedSet will often be different from choosing a word pseudorandomly from a HashSet. I think that it would be helpful to make note of this in the set since this is more a result of the testing framework rather than if a student has implemented the algorithms correctly. I understand that we have the line "To facilitate testing, you must use a single instance of java.util.Random, and it must be a static field in your class!", but I think a lot of students won't extrapolate this to storing the words in alphabetical order. If the only types of sets that students have learned about up until this point are SortedSets, then I don't think we need this detail; however, if they've learned hash sets, this details would be helpful.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking