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

  Describe the types of information available to a program

Describe the types of information available to a program when using the KeyListener interface.

  Shared assets do not bring competitive advantage

Why does Hansen recommend that competition among members should not be issue because shared assets do not bring competitive advantage? Describe.

  Sense the language of a

For this, sense the language of A is in the set of all languages, would showing this just involve making a DFA of one state that accepts everything? I am not sure how to show this.

  What were the beliefs of moor and finnis

What were the beliefs of Moor and Finnis. How were they similar and how were they different. Explain if they would apply to users of cyberspace. If they do explain how, if they do not explain how and support your work.

  Making it eco-friendly

When you hear the term "making IT eco-friendly", explain how this is related to Information Technology and the environment.

  Explain the importance of situating a society''s cultural

Explain the importance of situating a society's cultural

  Write dimensions of memory containing bytes of storage

Write down the dimensions of a memory containing 1mb(2^20) bytes of storage? How large would the MAR be? how many bits are sent to the row column decoders?

  Disaster recovery plan strategy for the organization

Utilizing your comprehensive security plan outline that is atttached as a guide, develop the business continuity and disaster recovery plan strategy for the organization. This is another piece that will go into the final paper

  Understanding the science of computers and the related

understanding the science of computers and the related fields can help you determine what career path suits your goals

  Family reliant on wood products from the forest

You have moved to a small village in a developing country. The people in this village rely on the nearby forest for the wood they use for cooking. The forest officially is a park and should not be harvested, but there are very few park rangers, and m..

  Research and the development of a summary of 5 it

Clarification: These systems are out of date, are not running virus software, and users all have administrative rights to the server and workstations. The website is also out of date and the website front end allows users to input data.

  Buying decisions major element in determining

Buying decisions are a major element in determining how to satisfy customers' needs more effectively than the competition. With this in mind, prepare a report for the Senior Buyer of JD Sports which

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