Java Help Needed to complete an assignment

Guys i got an assignment for my computer class...its seems simple but considering the fact that i am new to this programming field i couldn't figure out how to do it.
I am really counting on you guys..

I am posting my code that i wrote and the question so please if anyone can help it will be appreciated..
Version 1
Create a project called Lingo1.java

Lingo is a popular game show on the Game Show Network, with simple rules. Players are given the first letter of a randomly chosen 5-letter word, and must guess the remaining letters by guessing words. For each guess, any letters that are in the word and are in the correct position are circled. Any other letters that are in the word, but are in an incorrect position are boxed. Then the blanks are rewritten, with any circled letters included in the correct spots, and the player guesses again. If the player figures out the word within 6 guesses, they win. If they fail (or anytime they guess an invalid word) they lose.

Version 2
Create a project called Lingo2.java

Modify version 1 to pick the starting word randomly from a large array of at least 50 strings which is initialized in the program source code, rather than inputing the word from a neutral player.

Version 3
Create a project called Lingo3.java

Modify version 1 or 2 to use graphical output to show the sequence of guesses with correctly positioned letters shown in blue circles, and valid letters in incorrect positions shown in yellow squares. The entire sequence of guesses should be shown on a single screen.

PS. I've put my code in a text file because we cannot upload java file...
PLEASE HELP GUYS...
IF YOU WRITE WITH A NEW CODE THEN THAT WILL ALSO BE ACCEPTED...

Re: Java Help Needed to complete an assignment

You need to tell where exactly are u stuck or what problems you are facing.This site as far as i know is about getting help and guidance not ready-made solutions. So explain where exactly you are facing trouble and post your code within tags.. "[ CODE ]" "[ /CODE ]".

Re: Java Help Needed to complete an assignment

My code works and runs for the Lingo1 assignment but there are bugs....it is not running as it should ..It should run as shown in the picture but it is not....also i have no idea how to get started with the Lingo2 and Lingo3...

Re: Java Help Needed to complete an assignment

Re: Java Help Needed to complete an assignment

Originally Posted by nishantvodoo

I guess i wont get help from this forum....its better to delete this thread...thank you....

No, not until you ask a better question, but this skill improves with practice. Please have a look at the link in my signatures below on how to ask smart questions. The suggestions have helped me and could help you too.

Re: Java Help Needed to complete an assignment

my question is very clear....i posted my code...i mentioned the question and i mentioned the part in my code thats not acting right.....yet i have had no help from anyone...this is a very important project for me and i've been trying to do it for 3 days yet i couldnt figure out the way to do it right....if anyone can please help me.....

Re: Java Help Needed to complete an assignment

Originally Posted by nishantvodoo

my question is very clear....i posted my code...i mentioned the question and i mentioned the part in my code thats not acting right.....yet i have had no help from anyone...this is a very important project for me and i've been trying to do it for 3 days yet i couldnt figure out the way to do it right....if anyone can please help me.....

You've posted the assignment requirements, you've posted some code unreadable without code tags, and the only description of an actual question is this:

"// this is the part supposed to check the each character and add * or + or black space as shown in the picture.
// and i cant figure out where i went wrong"

Sorry for being blunt, but this tells us squat. How about putting in the effort to write a paragraph or two explaining in greater detail your actual problem, and the steps you've done to try to debug the situation? How about editing your code to use code tags as explained in the forum faq's? How about actually reading the link I've provided on code tags and on asking smart questions to see why your question is deficient in many ways?

The basic rule of thumb is that you should put as much effort into writing your questions as you'd hope one of the volunteers here would put in trying to help you out. So far all you've done is dump your code and assignment and give 2 lines of explanation.

Re: Java Help Needed to complete an assignment

This is how mine works......

Let me clarify the code too
// this is the part supposed to check the each character and add * or + or black space as shown in the picture.
// and i cant figure out where i went wrong
//[CODE]
// Message1 is the message in line 1
// Message2 is the message in line 2
// ch is the word entered by player 1 for player two that has been converted to character array
// th is the word being guess bu player 2 that has also been converted to character array
for (int count1=0; count1<=4; count1++)
{
// this checks if each character are equalif (th[count1]==ch[count1])
{
// if equal then * is added
message1+=th[count1]+"* ";
message2+=ch[count1]+"* ";
}
else
{
// if not equal then it is checked if the character is present in other position of word
if(c.indexOf(th[count1])!=-1)
{
// if located in other position then + is added
message1+=th[count1]+"+ ";
message2+="_";
}
else
// if not present at all in the word then _ is added
{
message1+=th[count1]+" ";
message2+="_ ";
}
}
}
}
return 3;

Re: Java Help Needed to complete an assignment

Well .. Have you ever thought what will be the result if we type "RELAY" ? . As far as I can see the base mistake you are doing is not saving the state of the previous matching letters. You need to Store the row number of the previously matched words... in short all the "*" location needs to be stored and excluded when the next time you do the check.
Say you have another array where you have saved the repetition of * (in the above example the repetition of "A" ). Then while checking for the next word match you will skip those particular position retaining the previous values at that spot. That means if A is present at point 1 and 3 in previous guess we will not check for those positions in next one .. instead just check 2,4 ,5 and join the result.
In short you are not saving the state of previous guess successes and comparing it every time with new one ...