ACSL Program Help

This is part of my java final and i am lost

Page 1 of 1

3 Replies - 1854 Views - Last Post: 14 December 2009 - 05:27 PM Rate Topic: -----

#1 jco10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-December 09

ACSL Program Help

Posted 08 December 2009 - 06:20 AM

PROBLEM: In the sport of golf, scoring is based upon what a normal score should be for a particular hole on a course. That normal score called “par” is based upon the length of that hole measured from the tee, the start point, to the green, the end point. For the vast majority of golf courses and for this problem par values will be either 3, 4 or 5. Golf scores can be reported in three ways. The first way is to report cumulative score. That is, the player scored a 68 after playing the standard 18 holes. The second way is to report the cumulative score in relation to par. If par for the course ( the sum of the par values of all the holes) is 72, then the score reported as 68 would be 4 under par. A score of 75 would be 3 over par. A score of 72 is reported as par. The third way is by holes won. A player wins a hole when his score is lower than his opponent’s score.

INPUT: There will be 9 input lines. Each line will contain 3 positive integers. The first integer will give the par value of each of the nine holes. The second integer will give the score for player A on the same nine holes. The third integer will give the score for player B on the those nine holes.

OUTPUT: There will be five outputs. Print the following:

1. The cumulative score for each player with the better score (the smaller number) first.
2. The score in relation to par for the better score.
3. The score in relation to par for the other player.
4. The number of holes won by the player with the better score.
5. The sum of the scores on a the hole that is the highest for all the holes played.
______________________________________________________________
INPUT:
1. 3,2,3
2. 4,5,5
3. 5,6,6
4. 4,3,4
5. 4,3,4
6. 4,4,5
7. 5,5,6
8. 3,3,3
9. 4,4,5

OUTPUT:
1. 35, 41
2. 1 under par
3. 5 over par
4. 6
5. 12

this is what i need help on. i am a complete begginer at this and would really spreciate some code with explanations to help. :crazy: 


Is This A Good Question/Topic? 0
  • +

Replies To: ACSL Program Help

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10392
  • View blog
  • Posts: 38,456
  • Joined: 27-December 08

Re: ACSL Program Help

Posted 08 December 2009 - 06:54 AM

I would like my MIT thesis paper for my Ph.D. Please send in return for source code.

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.

This post has been edited by macosxnerd101: 08 December 2009 - 06:54 AM

Was This Post Helpful? 0
  • +
  • -

#3 10rbacon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 14-December 09

Re: ACSL Program Help

Posted 14 December 2009 - 04:41 PM

I was hoping that someone could help me with the same problem. This program is due tomorrow for me and my code isn't working. Can anyone help me?
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: ACSL Program Help

Posted 14 December 2009 - 05:27 PM

View Post10rbacon, on 14 Dec, 2009 - 03:41 PM, said:

I was hoping that someone could help me with the same problem. This program is due tomorrow for me and my code isn't working. Can anyone help me?

so show us your code that is not working
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1