Calculate the average and strike rate of all players

Assignment Help Basic Computer Science
Reference no: EM13937030

Your program will read two data files, set up in the same folder as was done for the
first assignment. These data files are called input2a.dat and input2b.dat.
You program should have the following steps:

1. Read the team members' family names from the first data file and store them (wherever your program design says it is best to do so). There will be 15 names. You may then close the first file.

2. Read the second data file until end-of-file. Each data set in this file will consist of a name followed by a number of Overs Maidens Runs Wickers. It will also be possible for this file to be empty.

3. For each data set, check for data consistency. If any data item is negative the data set is invalid. If overs is less than maidens then the data is invalid. If the number of wickets is greater than 10, then the data is invalid. Any invalid data set is reported with an error message and ignored.E.g. Johnson 6 12 45 2 - data is invalid

4. For each data set, find the correct bowler in your list, add in the number of Overs Maidens Runs Wickets to that bowler's overall performance for the summer. For each bowler, you should also keep a copy of this input data as that bowler's latest performance. If the bowler's name cannot be found, then the data is also invalid, whereupon it is reported as such, and then ignored.
E.g. Johnsen 12 6 45 2 - name not found in team list

5. Calculate the average and strike rate of all players. If you cannot perform a particular calculation you may leave the figure as zero and then deal with this situation when the values are needed to be output.

6. Produce an alphabetically ordered list of the players and their performances overall (including average and strike rate) and their latest performance (just the O M R W values). Use an output format that will right-justify the name. If a result does not exist it can be printed as space characters.

7. Sort the list into decreasing order of bowling performance (best bowler first).

8. Produce a similar list of results to the one above, but this time, only print results for players that have bowled at least 1 over during the summer. Observation: While it is possible to complete this assignment using a number of parallel arrays, your design will be better and easier to work with, if you define your own structured type (it is best to use our naming convention of structname_t), and then have a single array of these objects. Your design will also benefit from having a number of functions. A solution that does not have well designed functions to perform major tasks, will be marked down significantly.

tried to add the pdf file here

Reference no: EM13937030

Questions Cloud

Employee prescreening and termination processes : Project: Employee Prescreening and Termination Processes- Develop a list of recommended steps to include in a preemployment hiring process. Develop a list of recommended steps to include in an employee termination process
A contentious issue in our court system : Courts commonly order children to be given life-saving treatment, even against their own wishes and the wishes of their parents. Courts seldom order adults to be treated against their wishes. Why? What are the differences?(This is a contentious issue..
Compute the return on investment in average operating assets : Calculate the return on investment in average operating assets employed (ROI) for 2007 for the Frankfurt Steel Division. Calculate Frankfurt Steel Division's residual income on the basis of average operating assets employed.
Avoid in evaluating fallacies : What are the two extremes that one must avoid in evaluating fallacies? Explain them 75 word limit
Calculate the average and strike rate of all players : Read the team members' family names from the first data file and store them (wherever your program design says it is best to do so). There will be 15 names. You may then close the first file.
Describe three different specific malware instances : Describe three different specific malware instances, with specific real life impact. What is the worst that can happen in these three instances? Defenses
Particular relation to the australian industry : Would like the task completed in particular relation to the Australian industry but also the world wide industry. not any other singular market e.g. India You are to execute an industry research project which requires an investigation of an issue ..
What does the term descent with modification mean : What does the term "descent with modification" mean as it relates to the evolutionary term of natural selection? What evidence lends supports?
What might bentham and aristotle say of a personwho : On the basis of class readings what might Bentham and Aristotle say of a personwho takes pleasure in dog fighting?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a program prompts user to enter the first digits

Need help to write problem displaying ISBN(international standard book numbers). Question as follows:

  Are robots remotely controlled by humans really robots

Are robots remotely controlled by humans really robots?

  Create the digital building block adder in verilog

Create the digital building block adder in Verilog. Give baseline design (of minimum cost) and improved design (of higher performance). Compile, simulate, and synthesis your Verilog codes.

  What are the basic network management functions

(1) What are the basic network management functions: OAMP? (2) Describe what are in SNMPv1

  Write lines of code as instructed in steps

Write lines of code as instructed in Steps

  Risk assessment on the above network deployment

Name and describe one technology that could be used to reduce each of the risks you identified above (one technology per risk). Briefly discuss when and where the technology is commonly used and where it could be placed in the ITA network to effec..

  Encode or decode a color combination

In the early days of computer graphics, colors where represented as two numbers. The first number was the foreground color and the second was the background color. These two values, which ranged from 0 to 15 were stored within a single byte; the fore..

  Tradeoffs involved to improve overall system performance

What are your thoughts on the tradeoffs involved when attempting to improve overall system performance. Provide examples where an increase in the performance of one resource.

  Javascript alert box with a blue background

Create a javascript alert box with a blue background and a bold font. Please do use any buttons for this alert. Write a function and an alert should pop up after that function is executed.

  Create a new android application project

Create a new Android Application Project. The main screen should state the name of the person who owns the phone.

  K and l are mobile across sectors.

The next three questions pertain to the two-good (M,F)-two-factor (K-L) Harberger model.Unless noted otherwise, assume that each factor of production is always fully employed, allmarkets are competitive, and K and L are mobile across sectors.

  Describe the definition of social change what does social

what is the definition of social change? what does social change mean to you in your daily life? do you think about

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