Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Java Help (Penny Pitch Program) Someone please write this for me?

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Java Help (Penny Pitch Program) Someone please write this for me?

    Directions: Write a program to play the Penny Pitch game. The layout of the board is two-dimensional as follows:
    Write a program to play the Penny Pitch game. The layout of the board is two-dimensional as follows:
    1 1 1 1 1
    1 2 2 2 1
    1 2 3 2 1
    1 2 2 2 1
    1 1 1 1 1

    In the game, a player tosses several pennies on the board aiming for the number with the highest value and a running total is kept. When the game starts, prompt the user for the number of pennies they have to toss (minimum of five and a maximum of 25). Make sure to check for a valid number of tosses. At the end of the game, sum the total of the tosses and return the total. Also display the number of times a penny landed on a 1 spot, 2 spot, and 3 spot. The program should perform the following steps each time the user still has a penny to toss:
    Generate two random numbers for the row and column of the toss
    Add the number at this position to a running total
    Update the count for the number of times a penny lands on 1, 2 and 3 spots
    Display the board, replacing the numbers with Ps where the pennies land.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,360
    My Mood
    Hungover
    Thanks
    144
    Thanked 626 Times in 537 Posts

    Default Re: Java Help (Penny Pitch Program) Someone please write this for me?

    Did you have a question?

    Please see the link in my signature on asking questions the smart way, then try again.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Help (Penny Pitch Program) Someone please write this for me?

    Where can I ask questions then?

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,360
    My Mood
    Hungover
    Thanks
    144
    Thanked 626 Times in 537 Posts

    Default Re: Java Help (Penny Pitch Program) Someone please write this for me?

    Quote Originally Posted by shaig13 View Post
    Where can I ask questions then?
    You can ask questions here. The problem is you simply copied your homework assignment here instead of actually asking a question. This is generally considered pretty rude, not to mention difficult to figure out exactly what you need help with.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. write a java program
    By mohd faizan shekh in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 9th, 2013, 04:31 PM
  2. Replies: 2
    Last Post: January 25th, 2013, 08:54 PM
  3. write a program in java?
    By rajasekharreddy in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 25th, 2012, 08:58 AM
  4. help me write java program
    By stevisto in forum Member Introductions
    Replies: 1
    Last Post: September 13th, 2011, 03:44 PM
  5. Java Pitch Detection and Replacement?
    By Stratgtar565 in forum Java Theory & Questions
    Replies: 1
    Last Post: September 12th, 2011, 03:34 AM

Tags for this Thread