we have to compute the letter grades for a course. The data is a collection of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
we have to compute the letter grades for a course. The data is a collection of student records stored in a file. Each record consists of a name(up to 20 characters), ID (8 characters), the scores of 10 homework assignments, a score for class participation, and the scores of three midterm tests and the final test (all positive integers). The maximum score a student can earn on any of these is 100. A sample file with 2 records is shown below: Pondicherry, John XPQ23456 91 48 76 0 23 91 91 84 95 93 81 76 84 91 73 Quincy, Jane XPL27856 81 58 76 40 73 49 91 84 89 93 90 79 94 81 73 Output Specifications. The output of the program is a file with the following data in each row <name>, <id>, <hwork&particpation score> <test score> <total score> <letter grade> The output for the above input would look like this: Pondicherry, John XPQ23456 38.65 39.7 78.35 C Quincy, Jane XPL.27856 39.2 40 79.2 C Note that all the fields in the output display are correctly aligned for easy reading; this requires the use of the setwidth operator, which is discussed in the early chapters of the text. The rules for calculating scores and the letter grade are as follows: The aggregate score on the homework assignments and class participation (maximum of 50). The best nine homework scores and the class participation score are used to compute the score for the assignments and class participation. All of the assignments and the class participation have equal weight; the worst homework score is discarded and the other nine are added to the class participation score and this sum is scaled down so that the maximum is 50. (The sum of the best nine scores can be calculated as follows: Keep track of both the sum and the minimum when you read from the file; at the end subtract the minimum score from the sum.) • The aggregate score on the tests (maximum 50).All the midterm scores are equally weighted, whereas the final exam carries twice the weight of each midterm (e.g., if midterm scores are 60, 70, 80, and final is 90, aggregate test score is 39 out of 50). • The total score (homeworks & participation + tests, maximum 100) A letter grade (A (2 90), B (2 80), C (270), D (260) or F (<60)). Other requirements. We require a system that is flexible and does some simple checks on the data. Data Checks. The only data check is that all the raw scores should be between 0 and 100. If any of the scores is outside this range, the corresponding aggregate score and the overall score are recorded as -1.0 and the student is awarded a grade of Z. As an example, the data record Pondi, Joe XPQ23456 91 48 76 0 23 91 91 84 95 93 81 76 84 101 73 generates the output line Pondi, Joe XPQ23456 38.65 -1.0 -1.0 Z (Here the first 10 scores are homework scores, the eleventh is the participation score and the last four are test scores. The lowest homework score, i.e., 0, is dropped. One of the test scores is 101, so that function returns -1, and as a result the total score becomes -1, and the grade becomes Z.) Question 1. (Analysis and Design) Following the example of payroll program discussed in class (see handout on D2L) complete the analysis of the problem and top-level design of the solution. (Note that you will need a main unit and five sub-units.) The analysis should give following information: (i) A high level description of the process. (ii) A description of all the functional units to be created (name, purpose, parameters and return value; include a description of the strategy if the process is complicated). (iii) A set of (at least 10) test cases that check all aspects of the program, along with the expected results. Upload the word file to CourseFiles into the folder Project 1. Question 2. (Stage 1 of implementation) Generate a script file showing the source, compilation of the program (using the g++ command), and the tests. Only the output function will be fully coded. The name and id will be read and stored, and all the remaining data will be skipped over using a getLine() statement. (Follow the example for the payroll program.) Upload the script to CourseFiles. Question 3. (Stage 2 of implementation) Write the C++ code for the hworkScore function. Compile and test the program to ensure that this function is working correctly. Generate a script file showing the testing of all aspects, including the data checks. Upload the script to CourseFiles. Question 4.(Stage 3 of implementation) Complete the code for the testScore function. Com- pile and test the program to ensure that this function is working correctly. Generate a script file showing the testing of all aspects, including the data validity checks. Upload to CourseFiles. Question 5. (Final Stage of implementation) Complete the code for the functions that compute the total score and letter grade. Compile and test the program to ensure that these functions are working correctly. Generate a script file showing the tests. The program should also be tested on an empty file. Record all the test results in your test table. Upload to CourseFiles. Question 6. Reflect on your experience with this project. How carefully did you follow the specified steps? How did it affect your ability to complete the program? What are the possible advantages of using such a structured (or systematic) approach? Upload to CourseFiles. we have to compute the letter grades for a course. The data is a collection of student records stored in a file. Each record consists of a name(up to 20 characters), ID (8 characters), the scores of 10 homework assignments, a score for class participation, and the scores of three midterm tests and the final test (all positive integers). The maximum score a student can earn on any of these is 100. A sample file with 2 records is shown below: Pondicherry, John XPQ23456 91 48 76 0 23 91 91 84 95 93 81 76 84 91 73 Quincy, Jane XPL27856 81 58 76 40 73 49 91 84 89 93 90 79 94 81 73 Output Specifications. The output of the program is a file with the following data in each row <name>, <id>, <hwork&particpation score> <test score> <total score> <letter grade> The output for the above input would look like this: Pondicherry, John XPQ23456 38.65 39.7 78.35 C Quincy, Jane XPL.27856 39.2 40 79.2 C Note that all the fields in the output display are correctly aligned for easy reading; this requires the use of the setwidth operator, which is discussed in the early chapters of the text. The rules for calculating scores and the letter grade are as follows: The aggregate score on the homework assignments and class participation (maximum of 50). The best nine homework scores and the class participation score are used to compute the score for the assignments and class participation. All of the assignments and the class participation have equal weight; the worst homework score is discarded and the other nine are added to the class participation score and this sum is scaled down so that the maximum is 50. (The sum of the best nine scores can be calculated as follows: Keep track of both the sum and the minimum when you read from the file; at the end subtract the minimum score from the sum.) • The aggregate score on the tests (maximum 50).All the midterm scores are equally weighted, whereas the final exam carries twice the weight of each midterm (e.g., if midterm scores are 60, 70, 80, and final is 90, aggregate test score is 39 out of 50). • The total score (homeworks & participation + tests, maximum 100) A letter grade (A (2 90), B (2 80), C (270), D (260) or F (<60)). Other requirements. We require a system that is flexible and does some simple checks on the data. Data Checks. The only data check is that all the raw scores should be between 0 and 100. If any of the scores is outside this range, the corresponding aggregate score and the overall score are recorded as -1.0 and the student is awarded a grade of Z. As an example, the data record Pondi, Joe XPQ23456 91 48 76 0 23 91 91 84 95 93 81 76 84 101 73 generates the output line Pondi, Joe XPQ23456 38.65 -1.0 -1.0 Z (Here the first 10 scores are homework scores, the eleventh is the participation score and the last four are test scores. The lowest homework score, i.e., 0, is dropped. One of the test scores is 101, so that function returns -1, and as a result the total score becomes -1, and the grade becomes Z.) Question 1. (Analysis and Design) Following the example of payroll program discussed in class (see handout on D2L) complete the analysis of the problem and top-level design of the solution. (Note that you will need a main unit and five sub-units.) The analysis should give following information: (i) A high level description of the process. (ii) A description of all the functional units to be created (name, purpose, parameters and return value; include a description of the strategy if the process is complicated). (iii) A set of (at least 10) test cases that check all aspects of the program, along with the expected results. Upload the word file to CourseFiles into the folder Project 1. Question 2. (Stage 1 of implementation) Generate a script file showing the source, compilation of the program (using the g++ command), and the tests. Only the output function will be fully coded. The name and id will be read and stored, and all the remaining data will be skipped over using a getLine() statement. (Follow the example for the payroll program.) Upload the script to CourseFiles. Question 3. (Stage 2 of implementation) Write the C++ code for the hworkScore function. Compile and test the program to ensure that this function is working correctly. Generate a script file showing the testing of all aspects, including the data checks. Upload the script to CourseFiles. Question 4.(Stage 3 of implementation) Complete the code for the testScore function. Com- pile and test the program to ensure that this function is working correctly. Generate a script file showing the testing of all aspects, including the data validity checks. Upload to CourseFiles. Question 5. (Final Stage of implementation) Complete the code for the functions that compute the total score and letter grade. Compile and test the program to ensure that these functions are working correctly. Generate a script file showing the tests. The program should also be tested on an empty file. Record all the test results in your test table. Upload to CourseFiles. Question 6. Reflect on your experience with this project. How carefully did you follow the specified steps? How did it affect your ability to complete the program? What are the possible advantages of using such a structured (or systematic) approach? Upload to CourseFiles.
Expert Answer:
Answer rating: 100% (QA)
Introduction The turnover rate among fast food workers is a multifaceted aspect influenced by various factors Understanding the rate at which employee... View the full answer
Posted Date:
Students also viewed these accounting questions
-
Consider a quasi-one-dimensional steady advection-diffusion flow with the boundary conditions as illustrated in Figure 1: u(x) x=0 p=0 in = puA = 1 x 10-4 -4 kg/s Figure 1 In Figure 1, the velocity u...
-
In this assignment we would like to implement a version of the rock paper scissors game, where the character R represents rock, P represents paper, and S represents scissors. The expression (R&S)...
-
The file S02_10.xlsx contains midterm and final exam scores for 96 students in a corporate finance course. a. Do the students scores for the two exams tend to go together, so that those who do poorly...
-
Elevator Controller The block diagram for an elevator controller for a two-floorelevator follows. The inputs FB1 and FB2 are 1 when someone in the elevatorpresses the first and secondfloor buttons,...
-
Determine the equation of the trend line through the following cost data. Use the equation of the line to forecast cost for year 7. Year ... Cost ($ millions) 1 ..... 56 2 ..... 54 3 ..... 49 4 ........
-
Imagine a small electron-sensitive probe of volume 1.00 pm3 inserted into an H+2 molecule-ion in its ground state. Calculate the probability that it will register the presence of an electron at the...
-
Alleghany Technologies Incorporated disclosed in its annual report that: Discuss why a liquidation of LIFO inventory quantities would reduce a companys cost of goods sold. Does this event indicate...
-
The following equation is sometimes used to forecast financial requirements: AFN = (A0*/S0) (S) (L0*/S0) (S) MS1 (1 POR) What key assumption do we make when using this equation? Under what...
-
Can you write a literature review about how does the quality of financial reporting impact the performance of firms.
-
Imagine that you are Magna's new corporate controller and answer the following: 1. Describe Magna's strategy in terms of how it competes for customers. 2. Based on Magna's strategy and the data...
-
XYZ corporation would like to buy 15,000 units of commodity A after 1 year and wants to hedge the price risk using futures contracts. Unfortunately, there are no futures contracts on commodity A....
-
What measures, other than those outlined in the Standards, can be taken by internal auditing departments to promote and maintain professionalism?
-
What are the eight articles of the Code of Ethics of The Institute of Internal Auditors? What is the difference between the Code of Ethics for the general membership of The IIA and that for Certified...
-
Suppose that D = 0.75 and eD F = 0.5 for a given country: a. Are import demands elastic or inelastic in this case? b. Does the Marshall-Lerner condition hold? How do you know? c. Suppose that...
-
What is "the yellow book"? Discuss its provisions and significance.
-
Consider the following data on union versus nonunion wage and fringe benefit compensation. Calculate the union effect for hourly wages, hourly fringe benefits, and total hourly compensation. What...
-
EXERCISE 02 (a) A company X sells 1000 gallons of fuel per month at a constant rate. The fuel is purchased in bulk from a local wholesaler, who delivers instantly on demand. A delivery charge of 200...
-
For a Poisson process of rate , the Bernoulli arrival approximation assumes that in any very small interval of length , there is either 0 arrivals with probability 1- or 1 arrival with probability ....
-
Arich uncle allows you to stipulate which of two ways you receive your inheritance: a. \($850,000\) one year after his death or b. \($250,000\) on his death and \($200,000\) each year at the end of...
-
You have the right to receive \($30,000\) at the end of each of the next four years, and money is worth 8%. Using the PV tables, your financial calculator, or Excel, compute the present value of this...
-
Briefly describe the concept of the time value of money.
Study smarter with the SolutionInn App