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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education