Sample Output of Assignment 3, KXO151, 2019 (Note: text in bold are sample inputs from a user)
C:\kxo151> javac Asst3.java
C:\kxo151> java Asst3
Stalk a Celebrity!
==================
You have to find and seduce your ideal celebrity. Now. Would you like to play Stalk a Celeb? n
0 moves.
C:\kxo151> java Asst3
Stalk a Celebrity!
==================
You have to find and seduce your ideal celebrity. Now.
Would you like to play Stalk a Celeb? y
True/False, do you want to stalk a male celebrity? True
You are stalking Ryan Gosling.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind
is #7.
You have declared your love 0/3 times and shouted in empty streets
0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 11
To where? Sorry buddy, that’s not possible…
You are stalking Ryan Gosling.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind
is #7.
You have declared your love 0/3 times and shouted in empty streets
0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 4
To where? Sorry buddy, that’s not possible…
You are stalking Ryan Gosling.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind
is #7.
You have declared your love 0/3 times and shouted in empty streets
0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 3
You scream ‘I love you’! But no one is around to hear…
Page 1 of 5
You are stalking Ryan Gosling.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind
is #7.
You have declared your love 0/3 times and shouted in empty streets
1 time.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 5
You scream ‘I love you’! But no one is around to hear…
You are stalking Ryan Gosling.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind is #7.
You have declared your love 0/3 times and shouted in empty streets 2 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s
Which street would you like to shout into? 1
You scream ‘I love you’ to a policeman. Enjoy the asylum…
Would you like to play Stalk a Celeb again? y True/False, do you want to stalk a male celebrity? true
You are stalking Leonardo DiCaprio.
You are in street #7.
To your left is #6, to your right is #8, ahead is #4, and behind
is #1.
You have declared your love 0/3 times and shouted in empty streets
0 times.
You can hear the paparazzi.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 6
You scream ‘I love you’! But no one is around to hear…
You are stalking Leonardo DiCaprio.
You are in street #7.
To your left is #6, to your right is #8, ahead is #4, and behind
is #1.
You have declared your love 0/3 times and shouted in empty streets
1 time.
You can hear the paparazzi.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 8
You scream ‘I love you’! It goes unanswered…
You are stalking Leonardo DiCaprio.
You are in street #7.
To your left is #6, to your right is #8, ahead is #4, and behind
is #1.
You have declared your love 1/3 times and shouted in empty streets
1 time.
Page 2 of 5
You can hear the paparazzi.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s Which street would you like to shout into? 8
You scream ‘I love you’! It goes unanswered…
You are stalking Leonardo DiCaprio.
You are in street #7.
To your left is #6, to your right is #8, ahead is #4, and behind
is #1.
You have declared your love 2/3 times and shouted in empty streets
1 time.
You can hear the paparazzi.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: s
Which street would you like to shout into? 8
You scream ‘I love you’! Finally you’re seen and you’re instantly soulmates.
Would you like to play Stalk a Celeb again? y True/False, do you want to stalk a male celebrity? false
You are stalking Lena Headey.
You are in street #2.
To your left is #1, to your right is #0, ahead is #8, and behind
is #5.
You have declared your love 0/3 times and shouted in empty streets
0 times.
You can hear the paparazzi.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 8
You’re dazed and don’t know where you are.
You are stalking Lena Headey.
You are still dazed and don’t know where you are.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 8
To where? Sorry buddy, that’s not possible…
You are stalking Lena Headey.
You are still dazed and don’t know where you are.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 2
Walk successful but you’re still alone.
You are stalking Lena Headey.
You are still dazed and don’t know where you are.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 8
Walk successful but you’re still alone.
You are stalking Lena Headey.
You are in street #8.
To your left is #7, to your right is #6, ahead is #5, and behind
Page 3 of 5
is #2.
You have declared your love 0/3 times and shouted in empty streets 0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: r
Whole game reset!
You are stalking Emilia Clarke.
You are in street #3.
To your left is #5, to your right is #4, ahead is #0, and behind is #6.
You have declared your love 0/3 times and shouted in empty streets 0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: q
Quit selected.
Would you like to play Stalk a Celeb again? n 0 moves.
C:\kxo151> java Asst3 Stalk a Celebrity!
==================
You have to find and seduce your ideal celebrity. Now. Would you like to play Stalk a Celeb? y
True/False, do you want to stalk a male celebrity? false
You are stalking Jennifer Lawrence.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind
is #7.
You have declared your love 0/3 times and shouted in empty streets
0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 2
To where? Sorry buddy, that’s not possible…
You are stalking Jennifer Lawrence.
You are in street #4.
To your left is #3, to your right is #5, ahead is #1, and behind is #7.
You have declared your love 0/3 times and shouted in empty streets 0 times.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w
Which street would you like to walk into? 5
Walk successful but you’re still alone.
You are stalking Jennifer Lawrence.
You are in street #5.
To your left is #4, to your right is #3, ahead is #2, and behind
is #8.
Page 4 of 5
You have declared your love 0/3 times and shouted in empty streets
0 times.
You can hear the paparazzi.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 8
You’re dazed and don’t know where you are.
You are stalking Jennifer Lawrence.
You are still dazed and don’t know where you are.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 5
Walk successful but you’re still alone.
You are stalking Jennifer Lawrence.
You are still dazed and don’t know where you are.
Please choose from (W)alk, (S)hout, (R)eset, or (Q)uit: w Which street would you like to walk into? 4
Oops, security detail front and centre. This won’t end well…
Would you like to play Stalk a Celeb again? n 4 moves: 5, 8, 5, 4.
C:\kxo151>
Page 5 of 5