Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Penny pitch #2 The penny pitch game is poplar in amusement parks. Penniestossed

ID: 3610035 • Letter: P

Question

Penny pitch #2

The penny pitch game is poplar in amusement parks. Penniestossed onto a board that has certain areas marked with differentprizes. For example:

Puzzle

Poster

Doll

Poster

Doll

Ball

Puzzle

Game

Puzzle

Ball

Poster

Game

Doll

Game

Ball

The prizes available on this board are puzzle, ball,poster, and doll. You can change or use these prizes. At the end of the game, if all the squares that say Ball in themare covered by a penny, then the player gets a Ball. This isalso true of the other prizes. The board is made up of 25squares. Each prize appears on 3 randomly chosen squares sothat 15 squares contain prizes.Write a penny pitch program thatsimulates ten pennies being randomly pitched onto the board. At the end of the game display a list of prizes won or None.

Good looking output counts!!!!!!

Must use a double subscripted array and Square class.

Use an array of String to store the prizes.

Use an array of integer to store tosses of pennies.

There is no need for the lines between the 25 Boxes.

Puzzle

Poster

Doll

Poster

Doll

Ball

Puzzle

Game

Puzzle

Ball

Poster

Game

Doll

Game

Ball

Explanation / Answer

Please rate - again Ask your Professor about "Scope Creep" and the Software DevelopmentLife Cycle. This is it. See what you can do with adding X'sas they are thrown import java.util.*; import javax.swing.*; public class pennypitch { public static void main(String []args) {Stringblank="                ",input; String[]x={"      X        ","       XX      ","      XXX        "}; String str=""; String[][] mat=new String[5][5]; String[]prize={"Puzzle    ","Doll        ","Game      ","Poster   ","Ball         "}; int[][] count=new int[5][5]; int i,j,row,col ,tot,prizes; int location[][][]=new int[5][3][2]; String yorn="Y"; boolean done; while(yorn.charAt(0)=='Y'||yorn.charAt(0)=='y')    {str=""; for (i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote