Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to do this G@me

Posted on 2006-10-20
22
Medium Priority
?
184 Views
Last Modified: 2010-03-31
http://members.sigecom.net/kseifert/WordLadders/solver.htm

First of all, is the above game difficult to do? will it take a lot time?

I intend to do similiar stuff but without the GUI

Thanks









0
Comment
Question by:babypink
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 10
22 Comments
 
LVL 14

Accepted Solution

by:
hoomanv earned 100 total points
ID: 17772804
Download the applet jar file from
http://members.sigecom.net/kseifert/WordLadders/WordLadders.jar
Use a java decompiler like JAD to see the source code of the applet
0
 

Author Comment

by:babypink
ID: 17772841
Downloaded JAD, but it only can decomplie .class file?
0
 
LVL 20

Expert Comment

by:Venabili
ID: 17772880
Get the class files out of the jar file... Jar is an archive...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:babypink
ID: 17772908
How to do it?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17772917
Use an arcive manager like winzip winrar 7zip
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17772933
Or type in cmd: jar -xf WordLadders.jar
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17772954
Copy the below line in a batch file (i.e. jad.bat) near jad.exe
   jad.exe -sjava -ff -pv4 -noctor -nonlb -space -t -o *.class
Then place all classes which you've extracted from WordLadders.jar, near jad.bat
Now double click on jad.bat
0
 

Author Comment

by:babypink
ID: 17772980
Hi hoomanv

manage to do it, thanks
0
 

Author Comment

by:babypink
ID: 17780926
can i ask how to convert a word like "dog" to an integer?
0
 

Author Comment

by:babypink
ID: 17780967
Example given a string of
re
ti
to
uh
um
un
up
us
ut
we
wo
xi
xu
ya
yo
How to find the shortest path to get from "re" to "yo" changing 1 letter a time ?
so it it "re" -> "we" -> "wo" -> "yo"
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17781041
Perform a BFS (Breadth First Search)
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17781050
> "dog" to an integer
"dog".hashCode()
0
 

Author Comment

by:babypink
ID: 17782481
Hi hoomanv ,

how to code for Perform a BFS (Breadth First Search)?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783114
You should first learn it. Read the soloutions to problems that are solved by BFS.
Then in this game you start from a root node and expand it to every other leaf node that is reachable from root.
For example "to"
Will lead to "ti" and "wo" and "yo"
And for each new node you have to perform the same strategy until you reach the answer
BFS can be implemented by a Tree or Stack data structure
0
 

Author Comment

by:babypink
ID: 17783450
Any similiar code to reference from?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783463
0
 

Author Comment

by:babypink
ID: 17783570
hard to cant find something similiar to my problem.....
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783621
You might not found anything similar similar, you should first get the idea behind BFS, and then start coding the game yourself
0
 

Author Comment

by:babypink
ID: 17783847
Given
private static List<String> data = new LinkedList<String>();
private static List<String>container = new LinkedList<String>();

How to check if a String in "data" is contain in the "container"

how to code it?

0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17783931
Iterate thru all elements of data and check
container.contains(element)
0
 

Author Comment

by:babypink
ID: 17786443
I can understand BFS in regard the nodes.....

But how to use it in my problem above?

Can explain in regard my example?
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 17889653
And the reason for C grade ?
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question