Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Dictionary {
- private Random rndm = new Random();
- private String word[] = {"PHONES", "HOUSES", "ACCORD", "WINDOW", "MEXICO",
- "NEVADA", "RESULT", "ETCHES", "PUBLIC", "GREENS", "BETRAY",
- "FAMILY", "BATMAN", "CASUAL", "DRIVER", "HARDLY", "CHEESE",
- "IMMUNE", "BUTTON", "MEDIUM", "NOTICE", "ORPHAN", "ENCORE",
- "SCHOOL", "UNIONS" };
- private String hard[] = {"LAZILY", "RHYTHM", "COAXES", "QUARTZ", "FIZZED",
- "EJECTS", "MATRIX", "PHOOEY", "JOUSTS", "SENSEI", "ZYGOTE",
- "YONKER", "WOWSER", "JUGFUL", "KAYAKS", "VERTEX", "UTOPIA",
- "SCHEME", "QWERTY", "KLUTZY", "IGUANA", "EPONYM", "GLYCOL",
- "QUICHE", "ZEPHYR"};
- private int hardIndex = rndm.nextInt(24);
- private int wordIndex = rndm.nextInt(24);
- public Dictionary (){
- }
- public Dictionary(int num, int num2){
- word[wordIndex] = word[num];
- hard[hardIndex] = hard[num2];
- }
- public String getWord(){
- return word[wordIndex];
- }
- public void setWord(int x){
- x = rndm.nextInt(24);
- word[wordIndex] = word[x];
- }
- public void setRandomWord(int x){
- x = rndm.nextInt(24);
- word[wordIndex] = word[x];
- }
- public String getHard(){
- return hard[hardIndex];
- }
- public void setHard(int y){
- y = rndm.nextInt(24);
- word[wordIndex] = hard[y];
- }
- public void setRandomHard(int y){
- y = rndm.nextInt(24);
- word[wordIndex] = hard[y];
- }
- public String toStringHard(){
- return hard[hardIndex];
- }
- public String toString(){
- return word[wordIndex];
- }
- }
Add Comment
Please, Sign In to add comment