1) Your opponent creates a word 2) Your opponent creates a word fragment that has no chance of becoming a word 3) Your opponent takes more than 15 seconds to write their letter to the shared file 4) Your opponent writes text to the shared file that does not conform to the game Text Format Guidelines 5) Your opponent does not submit a program Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are even length. Accordingly, if you are the first player you should only care about spelling even length words. You can tell if you are the first player by the length of the word fragment when it is your turn... O ^ Bi empty_ghost_proje....zip Ghost Primer ^ XVSCodeUserSetup....exe Ghost Proje... *MylOMana... AbstractFile... Student Ama

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
tionary.java
Overview
You and a partner will create a program that will compete against another program created by a
pair of your fellow classmates in a game that generally follows the rules of Ghost. The game will
consist of two programs that will take turns adding letters to a growing word fragment, trying not
to be the one to complete a valid word. Each fragment must be the beginning of an actual word.
The program that completes a word that has more than four characters loses. The program that
creates a word fragment that has no possible chance of creating a word loses.
Programmatic Rules
Your program will compete against another program, the programs will communicate with each
other by reading and writing from a shared file on the hard drive. Each program will take turns
adding a letter to an ever-growing word fragment in the shared file. Before adding a letter to the
file your program should figure out what the next best letter to play is. It should maintain the
current word fragment and use methods in a class that extends Abstract Dictionay.java to find
the next letter to choose. There is a third program written by the professor, called the arbiter,
that will officiate the game. The arbiter will also read and write to the shared file to communicate
with the programs. The arbiter is responsible for starting and stopping the game as well as
notifying each program when it is there turn. The arbiter will use a dictionary containing more
than 100K words to decide if a word greater then four characters has been made or if a
fragment has any possibility of creating a word. The arbiter will pass the file path of the shared
O
☀ +
empty_ghost_proje....zip
Ghost Primer
XVSCodeUserSetup....exe A
Ghost Proje...
*MylOMana...
AbstractFile...
Home
IJ StudentArra...
End
+
Insert
Transcribed Image Text:tionary.java Overview You and a partner will create a program that will compete against another program created by a pair of your fellow classmates in a game that generally follows the rules of Ghost. The game will consist of two programs that will take turns adding letters to a growing word fragment, trying not to be the one to complete a valid word. Each fragment must be the beginning of an actual word. The program that completes a word that has more than four characters loses. The program that creates a word fragment that has no possible chance of creating a word loses. Programmatic Rules Your program will compete against another program, the programs will communicate with each other by reading and writing from a shared file on the hard drive. Each program will take turns adding a letter to an ever-growing word fragment in the shared file. Before adding a letter to the file your program should figure out what the next best letter to play is. It should maintain the current word fragment and use methods in a class that extends Abstract Dictionay.java to find the next letter to choose. There is a third program written by the professor, called the arbiter, that will officiate the game. The arbiter will also read and write to the shared file to communicate with the programs. The arbiter is responsible for starting and stopping the game as well as notifying each program when it is there turn. The arbiter will use a dictionary containing more than 100K words to decide if a word greater then four characters has been made or if a fragment has any possibility of creating a word. The arbiter will pass the file path of the shared O ☀ + empty_ghost_proje....zip Ghost Primer XVSCodeUserSetup....exe A Ghost Proje... *MylOMana... AbstractFile... Home IJ StudentArra... End + Insert
Dictionary.java
R
ci do
file to your program as a Runtime argument. In your program's public static main(String[] args)
the shared file.
function args parameter will be an array of length 1 and the first index will contain the file path to
Conditions to Win
1) Your opponent creates a word
2) Your opponent creates a word fragment that has no chance of becoming a word
3) Your opponent takes more than 15 seconds to write their letter to the shared file
Guidelines
4) Your opponent writes text to the shared file that does not conform to the game Text Format
5) Your opponent does not submit a program
Tip: If you are the first player you can only spell words that are odd length thus you can only
lose when you spell words that are odd but you can win when your opponent spells words that
are even length. Accordingly, if you are the first player you should only care about spelling even
your turn.
length words. You can tell if you are the first player by the length of the word fragment when it is
100
191
empty_ghost_proje....zip
Y
Ghost Primer
&
7
U
8
pass the file path of the shared
XVSCodeUserSetup....exe
Ghost Proje...
9
*MylOMana...
AbstractFile...
Home
End
IJ StudentArra...
+ 11
Insert
Rai
Dele
Back
Transcribed Image Text:Dictionary.java R ci do file to your program as a Runtime argument. In your program's public static main(String[] args) the shared file. function args parameter will be an array of length 1 and the first index will contain the file path to Conditions to Win 1) Your opponent creates a word 2) Your opponent creates a word fragment that has no chance of becoming a word 3) Your opponent takes more than 15 seconds to write their letter to the shared file Guidelines 4) Your opponent writes text to the shared file that does not conform to the game Text Format 5) Your opponent does not submit a program Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are even length. Accordingly, if you are the first player you should only care about spelling even your turn. length words. You can tell if you are the first player by the length of the word fragment when it is 100 191 empty_ghost_proje....zip Y Ghost Primer & 7 U 8 pass the file path of the shared XVSCodeUserSetup....exe Ghost Proje... 9 *MylOMana... AbstractFile... Home End IJ StudentArra... + 11 Insert Rai Dele Back
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education