Previous process to store the scores in an array

Assignment Help Other Subject
Reference no: EM13260121

Modify the previous process to store the scores in an array. You will need to use either parallel arrays or a two-dimensional array in order to store the score, slope and rating for each entry. In the loop you created in the previous assignment to read the 10 scores, add logic to store the scores in an array. You will need to add validation logic in the loop to ensure that the user only enters acceptable numbers. A score of less than 60 should generate a display of “This score is too low, please enter the correct score.” You shouldn’t count this as an entry or add this score to the array. A score that is greater than 144 should generate a display of “The max score is a double par. I’ll give you a 144 for this round.” This should add a score of 144 to the array and count as an entry. The course Slope must be between 55 and 155. Any entry outside this range needs to generate a display of “This is not an acceptable Slope. Please try again.” You shouldn’t count this as an entry or add this score to the array. The courser Rating must be between 60 and 80. Any entry outside this range needs to generate a display of “This is not an acceptable Rating. Please try again.” You shouldn’t count this as an entry or add this score to the array. You don’t need to change the logic that calculates the handicap and adds it to the total handicap variable. After you have read all 10 scores, stored them in an array(s), calculated all 10 handicaps, added all the handicaps to the handicap total and exited the loop, create a new process to sort the scores in the array. Create a new loop to read the array and display all of the scores in numeric order, lowest to highest. After you exit this loop, you can execute the existing logic to display the average handicap. this is my last module. Program: Module main() Module handicap of a golfer () Display “Please enter your name” Input name Declare Integer Score, course Slope, and course Rating Display “Please enter the Score” Input Score Display “Please enter the course Slope” Input course Slope //as per the formulae (((Score – Rating) * 113) / Slope) Set handicap of a golfer = ((Score- Rating * 113) / Slope) Display “(Score-Rating * 113 / Slope)* Display End Module

Reference no: EM13260121

Questions Cloud

How much additional money will be in the account : A self-employed person deposits $3,000 annually in a retirement account (called a Keogh account) that earns 8 percent.
What are annual cash flows for the next five years : What are annual cash flows for the next five years? Hint: find CF0 to CF5
Explain the molecular formula of the compound : In a separate experiment, it was found that, for fixed temperature and pressure, a 0.100 L sample of this compound takes 1.73 times longer to effuse than does a 0.100 L sample of Ar(g). What is the molecular formula of the compound? , draw possibl..
What is the short-run profit outlook for american refineries : What is the short-run profit outlook for American refineries? What is the long-term profit outlook?
Previous process to store the scores in an array : Modify the previous process to store the scores in an array. You will need to use either parallel arrays or a two-dimensional array in order to store the score, slope and rating for each entry. In the loop you created in the previous assignment to re..
How much interest you earn if interest is left to accumulate : You invest $1,000 in a certificate of deposit that matures after 10 years and pays 5 percent interest, which is compounded annually until the certificate matures.
Find out the heat capacity of a bomb calorimeter : Solid benzoic acid, C6H5COOH(s), is often used to determine the heat capacity of a bomb calorimeter, because the constant volume heat of combustion of this compound is known with high precision: qV = ?26.434 kJ/g. When a 2.088 g sample of C6H5COOH..
Calculate the after-tax cost of debt : Preferred stock Eight percent (annual dividend) preferred stock having a par value of $100 can be sold for $65. An additional fee of $2 per share must be paid to the underwriters.
The real versus the ideal : The real versus the ideal. How are ideas of the inherent worth of the common man manifest in early 19th century art?

Reviews

Write a Review

Other Subject Questions & Answers

  Relationship among culture and behavior-field of psychology

It is important to understand the relationship between culture and behavior, especially for those in the field of psychology, because culture is not limited to a person's racial background or ethnicity

  Mother remarries

In European-American, middle-class families where divorce has occurred and the mother retained custody of the children, if the mother remarries

  Promoting health behavior changes

What personal issues might you face when promoting health behavior changes for someone who might have a different value orientation? What can you do to overcome these issues?

  Interview with either real person from the populist movement

Write an interview with either a real person from the Populist Movement or with one of the characters from the book The Wizard of Oz about the Populist Movement.

  Explain tay-sachs disease

Explain Tay-Sachs disease. Imagine you are a genetic counselor working with a couple who have just had a child who is suffering from Tay-Sachs disease. Neither parent has been tested for Tay-Sachs disease nor have there been any previous cases of Tay..

  Traditional hazards-new hazards associated with terrorism

What are the two major differences between traditional hazards and the new hazards associated with terrorism?

  Discussing tort actions arises in relation to family law

Can you help me with these questions? A father shows his minor son pornography and sexually abuses him. Can the son bring a tort action against his father?

  Use UML to model a dining room

Use UML to model a dining room. Every dining room has to have a table, four or more chairs, and a sideboard. Optionally, it also may have a fireplace.

  Production cost report

Sweet Concoctions a syrup product that passes through three departments. Data for March for the first department follow: Work in process, March1- Gallons:80,000 Materials:$68,600 Labor:$28,000 Overhead:$50,000

  Memory-serial learning-primacy-recency effects

Describe the term serial learning? Please give examples, preferably from your own life experience.

  Prepare a paper about organizational change

Prepare a paper about Organizational Change. You can talk about the reasons for change, resistance to change, overcoming and dealing with change, and/or managing change.

  Intelligence and emotional intelligence

Can someone help condense the definition of intelligence, including the main components of intelligence and also a discussed position as to whether or not emotional intelligence is an accurate measure of intelligence

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd