Java Programming question

timer Asked: Mar 25th, 2015

Question description

A gaming company wants a program for their parlor game. Six couples will play the game and your program should prompt for the names of all players.  The game consists of rolling two dice. When thrown the sum of both dice can be any number from 2 to 12.

On the first round the first person rolls the dice. If the total number on the dice is even the person stays in the game. If the total number is odd the person is out of the game. The next person rolls the dice and if even he stays in if odd he is out. This process continues until all 12 persons have rolled the dice. The program then prints out the remaining persons in the game.

A second round begins with the persons remaining from the first round. Once again the first person stays if the dice outcome is even but out if it is odd. This process continues for all the persons remaining after the first round. Your program should now print out the names of the persons remaining after the second round.

This process continues for round after round until only one person remains. This person is the winner and your program should print out a nice message to him along with his name.

The program should ask if the users want to play again. If so the game starts all over again. If not an exit message should be printed consoling the losers and congratulating the winner again.

Your program should have an introductory paragraph at the beginning to explain the rules of the game and welcome the participants.

Tutor Answer

(Top Tutor) Studypool Tutor
School: UCLA
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors