I'm having problems with 4 week exercise 83: Hangman logic

947 views
Skip to first unread message

ivana...@gmail.com

unread,
Dec 18, 2015, 7:48:28 PM12/18/15
to mooc.fi
Hi,

I'm having problems with week 4  exercise 83.

1. Button for "Run test locally" is disabled, i.e. grayed out. It is not grayed out for previous exercises.

2. Test for for 83.1 pass, but I have to open TestProgram.java and run it with shift+F6

3. If I run the Main.java or just run the project a popup "Hangman" window shows up.  Project is compiled and run. Output is displayed in tab named 083.Hirsipuulogiikka(run).  I am able to type in letters in this tab but nothing happens. The program is running forever. The popup hangman window does not change.

How am I supposed to run the test?
Where am I supposed to type in guessing letters?
Why is the button "Run test locally" disabled?

The link to my work is here: http://paste.mooc.fi/6d448e9b#

Best regards
Ivana

Jarmo Isotalo

unread,
Dec 19, 2015, 9:20:22 AM12/19/15
to ivana...@gmail.com, mooc.fi
Just a few additional questions to get better picture about what's going on

I'm wondering why the run-tests-locally button is disabled; are other tmc related buttons also disabled for the exercise?
What about other exercises? (especially next and previous exercise and exercise from different week, are tmc related buttons enabled for those?

Did you make any changes to the exercises, maybe move them to another folder without changing it also from tmc -> settings (or maybe other way around)

Based on the code snippet provided it seems at least there you are not reading any input from the user..

Best,
Jarmo

Also is the exercise for sure downloaded via tmc-plugin?





--
http://mooc.fi
---
You received this message because you are subscribed to the Google Groups "mooc.fi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moocfi+un...@googlegroups.com.
To post to this group, send email to moo...@googlegroups.com.
Visit this group at https://groups.google.com/group/moocfi.
To view this discussion on the web visit https://groups.google.com/d/msgid/moocfi/447927d8-6269-438c-8296-8912e17cddb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ivana Bojic

unread,
Dec 19, 2015, 3:52:29 PM12/19/15
to Jarmo Isotalo, mooc.fi
Hi Jarmo,

Appreciate your prompt response!

SOLVED: disabled button
I did more checks based on your suggestion and fix the disabled button.

Steps taken:
Checked all the other exercises and found only one (087.appartmentComparison)  with disabled button. After closing that project I was able to reload it through TMC->download/update exercise button. For 083.HangmanLogic I had to close and delete the project. After that I was able to update it through TMC->download/update exercise button.

UNSOLVED:

How am I supposed to run the test?
Where am I supposed to type in guessing letters when I Run Hangman Project ?

"Run tests locally"  gives me 4 errors:
FAIL: HangmanLogicTest guessedLetterIsAddedToTheSetOfGuessed
The guessed letter should be included to the already guessed letters.

FAIL: HangmanLogicTest guessedLetterIsAddedToTheSetOfGuessedOnlyOnce
The guessed letter should be included to the already guessed only once!

FAIL: HangmanLogicTest numberOfFaultsDoesNotIncreaseWithAlreadyGuessedLetter
Number of faults should not increase if a already guessed letter is guessed again

FAIL: HangmanLogicTest withTwoLetters
The set of guessed letters should grow then two different letters guessed

Based on the results from running the TestProgram using Shift+F6 all of the above should pass.

The link to altered TestProgram.java and the output of its run work is here:  http://paste.mooc.fi/b092aedf

Best regards,
Ivana

-- 
Ivana Bojic
"Start where you are. Use what you have. Do what you can."

ivana...@gmail.com

unread,
Jan 4, 2016, 9:22:29 PM1/4/16
to mooc.fi, ivana...@gmail.com
Hello all,

I solved this one. 

Couple suggestions to help those who do not speak Finnish:

1) Somewhere in the exercise description put "While running program type letters in the pop up window (game window)."

2) I've updated the HangmenFigure.java file by adding English words after the Finnish one i n the pop up window. Please check the code here and potentially update the file for future students.
You can see updated file here: http://paste.mooc.fi/45228c47

Thanks,
Ivana

Ivana Bojic

unread,
Jan 31, 2016, 6:41:44 PM1/31/16
to Jarmo Isotalo, loe...@gmail.com, mooc.fi
Hello Jarmo and Leo,

You are receiving this email because you answered some of my questions on the mooc.fi google group regarding object oriented programing with Java on-line course.

This one is a reference update, not a question and I did not feel like posting it on the google group.

UPDATE:
On the week 12 exercise 46: Film Reference
           exercise 46.1: Person and Film
                sentence: "Look at the example in section 45.1. In Section 45.2 there are guidelines to override hashCode methods."

The sections you want to point to are probably Section 39.1 and Section 39.2 from week 8.

Best regards,
Ivana
Reply all
Reply to author
Forward
0 new messages