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

  Byte-stuff the subsequent frame payload

Byte-stuff the subsequent frame payload in which E is the escape byte, F is the flag byte, and D is a data byte other than an escape of a flag character.

  Human and nature dynamics (handy) model

This paper is centered around some results obtained from the Human and Nature Dynamics (HANDY) model. This model is equation 3 in their paper.

  Explain what type of architecture new payroll application

Explain what type of architecture the new payroll application

  Explain which of the following are counted as part

Explain which of the following are counted as part of the money supply (M1): a. Checking account deposits

  Create a jsp that returns the name of the browser

I need to create a JSP that returns the name of the browser that is being used to display the page

  Relational database with ms access

Create a list that holds the student grade (A, A-, B+, ...), modify the appropriate table to accept only the grades in the list (you need to explain why you selected the above table record to the student grade).

  Reference to the normative ethical theories

Part 2 is a new piece of work that should not include material from Part 1. As before, it is a written analysis of a complex ethical problem similar to that which you might encounter in the IT industry.

  The outline pane shares its portion of the screen with the

The outline pane shares its portion of the screen with the _____ pane

  Business benefits that especially for you jewelers company

A technical term paper that I need done. Please include title page and reference page with references. This term paper needs to be in APA style. Include page numbers at the top right corner of each page.  The title page includes: title, name, date, c..

  Show how mips can implement the instruction swap

Show how MIPS can implement the instruction swap $rs $rt, which swaps the contents of registers $rs and $rt. Consider the case in which there is an available register.

  Create effective navigation for the application or site

Create effective navigation for the application or site

  Explain why it is important to document quality procedures

Explain why it is important to document quality procedures at the beginning of a project rather than later on. In addition, think about 2 advantages and 2 disadvantages of using standards for documentation in each of the software phases.

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