Highlights
Background
Word Games are an engaging means for players to demonstrate particular language skills. There are a large number of different types of games, and they are popular with everyone from young children to adults around the world. Classic examples of games that you may be familiar with include puzzles that can be solved individually such as Crosswords, or games that involve multiple players, such as ‘Hangman’ or the proprietary game ‘Scrabble’.
You can read more about Word Games in general on Wikipedia at https://en.wikipedia.org/wiki/Word_game
In this assignment you will are asked to implement a Word Game program written in Java. In summary the program will consist of:
A SubString Problem Word Game
A Points Problem Word Game
A Menu that allows a user to select which of the above games they would like to play.
A dictionary of words (as a separate file) for use in each of the word games.
More information on how the program should be organised, each of the word game problems, and the dictionary file can be found below.
Program organisation
The whole solution will be placed in a single class called WordGames. This includes the main() method that will be responsible for processing menu selections and initiating the corresponding problem that matches the selection. This will be repeated until the exit option is selected.
The WordGames class has a method for each of the four main components of the assignment: main(), getSelection(), substringProblem(), and pointsProblem(). These are all static methods as per a functional style of programming. Refer to Lecture 4.1 “Class definitions” (slides 21-25) for more information on this.
The WordGames class also has a constant class variable called DICTIONARY for the name of the dictionary file (dictionary.txt). This prevents repetition when referring to the dictionary from multiple locations. Since the four methods use the static modifier, the constant DICTIONARY class variable will also need to use the static modifier.
Menu selection
A separate method called getSelection() will be implemented to print the available menu options, receive the user’s selection with Java’s Scanner class, and return the answer to the calling method. There are three menu options altogether – one for each problem, and one to exit the program. Refer to “Sample Program Output” below for an example of the menu.
Word Game Problems
Substring Problem Word Game
Word games often test a player’s ability to make use of fragments of words to build (or sometimes break down) complete words.
For this problem, the term substring in programming can also mean the fragment. Consider the following examples of English-language substrings based on prefixes, infixes, or suffixes:
Prefix: The substring “fore” is a prefix of forehead and foreword.
Infix: The substring “s” is an infix of the plural of passerby as passersby. Other examples are slang words such as “bloody” in fanbloodytastic and “blooming” in absobloominglutely.
Suffix: The substring “ful” is a suffix of helpful and cheerful.
To solve the substring problem, you need to determine whether a substring
is a prefix of a given word
is an infix of a given word
is a suffix of a given word
You are expected to solve this problem for all of the words listed in the program dictionary file – refer to the ‘Dictionary’ heading below for more information.
Tip:
Take care when more than one of these applies at the same time, such as “na” as an infix and suffix of “banana”.
Points Problem Word Game
Some word games involve a component where scoring is based on what particular letters are played to make a word. The board game ‘Scrabble’ (and its many clones) are probably the best-known examples of this. In these games, players are required to place letters on a board to make complete words. Each letter that makes up the word has a point value as summarised in the table below:
Dictionary
For all these word problems, you will need some sample words to test the correctness of your solutions. These will be stored in a file called “dictionary.txt” in the top level of your project solution. Importantly, each of the solutions to the three main problems needs to read and process all words in the dictionary.
Task 1: Program design
Create the structure of your solution with the following components to match the instructions:
Class name
Class variable for the dictionary (static)
Method signatures
Task 2: Error handling
As you develop your solution, the following error handling scenarios must be accommodated:
Invalid menu option (wrong number or non-number): Ask for the input again.
Dictionary file cannot be opened: Print a message and exit.
Tasks 3-6: Implementation
Implement the details of the main(), getSelection(), substringProblem(), and pointsProblem() methods respectively.
Task 7: Coding conventions
The following coding conventions must be followed:
Commenting: Add a class header comment, five method header comments, and some inline comments.
Indentation: Consistently indent your code by one level per block. (A good guideline is the NetBeans default of 4 spaces per block.)
Naming conventions: Use TitleCase for class names, camelCase for variables and UPPER_CASE for constants.
Line lengths: Do not exceed the 80 characters per line guideline.
This IT/Computer Science Assignment has been solved by our IT/Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.