{"id":47970,"date":"2022-04-02T14:08:31","date_gmt":"2022-04-02T14:08:31","guid":{"rendered":"https:\/\/assignmenttutors.net\/blog\/java-programming-scrabble-help-the-file-dictionary-txt-contains-all\/"},"modified":"2022-04-02T14:08:31","modified_gmt":"2022-04-02T14:08:31","slug":"java-programming-scrabble-help-the-file-dictionary-txt-contains-all","status":"publish","type":"post","link":"https:\/\/assignmenttutors.net\/blog\/java-programming-scrabble-help-the-file-dictionary-txt-contains-all\/","title":{"rendered":"Java programming scrabble help: the file dictionary.txt contains all"},"content":{"rendered":"<div>\n<p>\u00a0<\/p>\n<p>JAVA Programming<\/p>\n<p><strong>Scrabble Help:<\/strong>\u00a0The file\u00a0dictionary.txt\u00a0contains all of the words in the Official Scrabble Player&#8217;s Dictionary, Second Edition.\u00a0<em>Note: this list contains some offensive language.<\/em>\u00a0Write \u00a0\u00a0a class, WordLists, in Java that generates useful word lists for scrabble players using this list.<\/p>\n<p>Your class should contain the following methods:<\/p>\n<ul>\n<li>WordLists(String fileName): a constructor that takes the name of the dictionary file as the only parameter.<\/li>\n<li>lengthN(int n): returns an ArrayList of all length\u00a0<em>n<\/em>\u00a0words (Strings) in the dictionary file.<\/li>\n<li>endsWith(char lastLetter, int n): returns an ArrayList of words of length\u00a0<em>n<\/em>\u00a0ending with the letter\u00a0<em>lastLetter<\/em><\/li>\n<li>containsLetter(char included, int index, int n): returns an ArrayList of words of length\u00a0<em>n<\/em>\u00a0containing the letter\u00a0<em>included<\/em>\u00a0at position\u00a0<em>index<\/em>. \u00a0So for example the word &#8220;cannon&#8221; would be on the list returned by \u00a0containsLetter(&#8216;o&#8217;,6,4) because it contains the letter &#8216;o&#8217;, at index 4, \u00a0and is length 6.<\/li>\n<li>multiLetter(int m, char included): returns an ArrayList of words with at least\u00a0<em>m<\/em>\u00a0occurrences of the letter\u00a0<em>included<\/em>.<\/li>\n<\/ul>\n<p>Use \u00a0the included template for your WordLists.java file. Write \u00a0\u00a0your own \u00a0test class for your WordLists class that tries these methods out and \u00a0writes the word lists (the ArrayLists of strings) to\u00a0 \u00a0<em><strong>text \u00a0<\/strong><\/em>\u00a0files.<\/p>\n<p><strong>What to hand in:<\/strong><\/p>\n<p>A \u00a0Template for the WordLists.java file is in the Assignment 5 workspace \u00a0on Codio. You must create \u00a0\u00a0your own test class (separate file with main \u00a0method) that tests each of your methods and writes the results to a \u00a0text file. In addition to the source files include a text file named \u00a0readMe.txt with an explanation of how your program works. That is, write \u00a0in plain English, instructions for using your software, explanations \u00a0for how and why you chose to design your code the way you did. The \u00a0readMe.txt file is also an opportunity for you to get partial credit \u00a0when certain requirements of the assignment are not met.<\/p>\n<p>\u00a0<\/p>\n<p>The dictionary.txt file contains like this:<\/p>\n<p>aa<\/p>\n<p>aah<\/p>\n<p>aahed<\/p>\n<p>aahing<\/p>\n<p>aahs<\/p>\n<p>aal<\/p>\n<p>aalii<\/p>\n<p>aaliis<\/p>\n<p>aals<\/p>\n<p>aardvark<\/p>\n<p>aardvarks<\/p>\n<p>aardwolf<\/p>\n<p>aardwolves<\/p>\n<p>aargh<\/p>\n<p>aas<\/p>\n<p>aasvogel<\/p>\n<p>aasvogels<\/p>\n<p>aba<\/p>\n<p>abaca<\/p>\n<p>abacas<\/p>\n<p>abaci<\/p>\n<p>aback<\/p>\n<p>abacus<\/p>\n<p>abacuses<\/p>\n<p>abaft<\/p>\n<p>abaka<\/p>\n<p>abakas<\/p>\n<p>abalone<\/p>\n<p>abalones<\/p>\n<p>abamp<\/p>\n<p>abampere<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 JAVA Programming Scrabble Help:\u00a0The file\u00a0dictionary.txt\u00a0contains all of the words in the Official Scrabble Player&#8217;s Dictionary, Second Edition.\u00a0Note: this list contains some offensive language.\u00a0Write \u00a0\u00a0a class, WordLists, in Java that generates useful word lists for scrabble players using this list. Your class should contain the following methods: WordLists(String fileName): a constructor that takes the name [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-47970","post","type-post","status-publish","format-standard","hentry","category-education"],"_links":{"self":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/47970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/comments?post=47970"}],"version-history":[{"count":0,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/47970\/revisions"}],"wp:attachment":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/media?parent=47970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/categories?post=47970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/tags?post=47970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}