C++ Golf Course Handicap Programming Task In this exercise, you will be working with golf handicaps and golf course data. We have provided a golfer's handicap. The information is stored in a text file called golfer.txt inside of the data/ folder. The format of the file is as follows: Lines 1: golfer's handicap We have also provided some data for a golf course. The information is stored in a text file called course.txt inside of the data/ folder. The format of the file is as follows: Lines 1: course rating Lines 2: slope rating Lines 3: course par Your goal is to create a utility which takes a golfer's handicap, course rating, slope rating, and course par, as standard input (keyboard), and prints the golfer's course handicap. The golfer's course handicap should be expressed as a floating point number. Recall that a golfer's course handicap, is a numerical value that represents the number of strokes a golfer should receive or give when playing a specific golf course. It is used to adjust a golfer's playing ability to match the difficulty of the course they are playing on. Requirements Pre-Submission Requirements: Build the program executable Name the executable gcoursehandicap Install the gcoursehandicap executable inside your ~/bin folder Git Requirements: You must commit your work before submitting. Additional Resources When you bootstrap this task, you will get the following files: .gitignore: file which specifies folders/files that git should ignore main.cpp: driver file in which you will provide the implementation of this programming task test.cpp: test file which can be invoked to test your program for correctness Makefile: file which automates the way in which you can compile, run, and unit test your program data/golfer.txt: file which contains golfer's handicap data/course.txt: file which contains course rating, slope, and par information Example Sample Input: 10.6994 73.5 134 72 Sample Output: 14.1878
C++
Golf Course Handicap
In this exercise, you will be working with golf handicaps and golf course data.
We have provided a golfer's handicap. The information is stored in a text file called golfer.txt inside of the data/ folder.
The format of the file is as follows:
Lines 1: golfer's handicap
We have also provided some data for a golf course. The information is stored in a text file called course.txt inside of the data/ folder.
The format of the file is as follows:
Lines 1: course rating
Lines 2: slope rating
Lines 3: course par
Your goal is to create a utility which takes a golfer's handicap, course rating, slope rating, and course par, as standard input (keyboard), and prints the golfer's course handicap. The golfer's course handicap should be expressed as a floating point number.
Recall that a golfer's course handicap, is a numerical value that represents the number of strokes a golfer should receive or give when playing a specific golf course. It is used to adjust a golfer's playing ability to match the difficulty of the course they are playing on.
Requirements
Pre-Submission Requirements:
Build the program executable
Name the executable gcoursehandicap
Install the gcoursehandicap executable inside your ~/bin folder
Git Requirements:
You must commit your work before submitting.
Additional Resources
When you bootstrap this task, you will get the following files:
.gitignore: file which specifies folders/files that git should ignore
main.cpp: driver file in which you will provide the implementation of this programming task
test.cpp: test file which can be invoked to test your program for correctness
Makefile: file which automates the way in which you can compile, run, and unit test your program
data/golfer.txt: file which contains golfer's handicap
data/course.txt: file which contains course rating, slope, and par information
Example
Sample Input:
10.6994
73.5
134
72
Sample Output:
14.1878

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









