Question: Program Assignment 2 Lets play golf ES Unit 4 PowerPoints & Pro X zy Section 44 - CSO 111: Cor X Bb Program 2 S21

Program Assignment 2 Lets play golf

Program Assignment 2 Lets play golf ES Unit 4 PowerPoints & ProX zy Section 44 - CSO 111: Cor X Bb Program 2

ES Unit 4 PowerPoints & Pro X zy Section 44 - CSO 111: Cor X Bb Program 2 S21 - let's play X C Get Homework Help With java - Goit retum output x W Jawa Tryit Editor v10 + blackboard.olemiss.edu/bbcswebdav/pid 2249829 dt content rid 74255732_1/courses/Csci_111_Davidson_ALL_2020 2021_SPRG/Program%202%20S21%20%20le... Program 2 S21 - let's play golf.pdf 2 - 1/2 | - 75% + 10 + Program 2: CSCI 111 - Spring 2021 Let's play golf! Introduction Golf is a club-and-ballsport in which players use various clubs to hit balls into a series of holes on a course in as few strokes as possible. The game at the usual level is played on a course with an arranged progression of 18 holes. The modem game of golf originated in 15th century Scotland, and the 18-hole round was created at the Old Course at St Andrews in 1764. Golf is played for the lowest number of strokes by an individual, known as stroke play. Each hole has a rating, known as par, which is the number of predetermined strokes a proficient/scratch golfer requires to complete the hole-par is 3, 4 or 51 For program 2. you are to determine the name of the golf shot, based on par for the hole: Name of Golf Shot Strokes under or over than par Albatross also called double eagle 3 under par Ipar or only Eagle 2 under par 1 under par Par Bogey 1 over par Double Bogey 2 aver par 2 Input Data: Par(int) ( Number of strokes (int) Output Data: Par Number of strokes Name of golf shot ifa hole-in-one, output Hole In One! To Start Create a lava class, Golf, naming your file Golfova. Include header comments (le, at the beginning of your fle formatted as shown below. Your electronic submission of the program file will represent your endorsement of the Honor Code Statement. Use your name and number Sedert 012345678 // Program 2 // Due // in keeping with the Honor Code of UM either // genner received assistance from anyone other than the Tor instructor // Put a program derption here en.wikisedia.org wild 4 CO 4:51 PM 3/3/2021 ES Unit 4 PowerPoints & Pro X zy Section 44 - CSO 111: Cor X Bb Program 2 S21 - let's play X C Get Homework Help With X java - Goit retum output 1 x W Jawa Tryit Editor v1.0 + blackboard.olemiss.edu/bbcswebdav/pid 2249829 dt content rid 74255732_1/courses/Csci_111_Davidson_ALL_2020 2021_SPRG/Program%202%2021%20%20l. Program 2 S21 - let's play golf.pdf 2/2 75% + + Alrorithm 1. prompt for the par. If anything other than 3, 4 or 5 is entered, output an error and do not continue 2. prompt for the number of strokes. If the number of strokes is less than 1 output an error 3. Determine the name of the golf shot. If the number of strokes is more than 2 over par, then output that it is greater than a double bogey 1 4. Determine whether or not the shot is a hole in one. If it is, then output hole in One! 5. Before each significant step, provide a comment explaining the step (do not comment every line of code). Submit your Golf.java on Blackboard. Twenty percent per day (or any part of a day) will be deducted for late programming assignments. Sample Output - 3 test cases bold, underlined numbers are my input from the keyboard): Enter par for the role 4 Enter number of strukes for the hole 2 For par 4 and 1 strokes, you shot an Albatross. Hole in Onel Enter par for the hole 2 Error! Par must be ), 43 Enter par for the hole Enter number of strokes for the hole For par 3 and 3 strokes, you shot Par 4 CO 4:52 PM 3/3/2021

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!