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,...
-
MULTIPLE-CHOICE QUESTIONS 1. Which of the following procedures would an auditor typically perform first when assessing the reasonableness of management's estimate of its pension liability? a. Inspect...
-
Construct a profile of the employee most likely to steal goods or money from an employer. What four elements must be present for employee theft to occur?
-
Du Page Products Company uses a job order cost system. For a number of months there has been an ongoing rift between the sales department and the production department concerning a special-order...
-
BIB Corporation's capital structure consists of 250,000 shares of common stock. At December 31, 2011, an analysis of the accounts and discussions with company officials revealed the following...
-
Unearned revenues are recorded by companies that ____.
-
Categorize each of the following characteristics as being more representative of either traditional manufacturing or lean production. 1. Quality tends to be inspected-in rather than built-in. 2....
-
If K is the midpoint of JL, JK = 8x + 11 and KL 14x-1, find JL. =
-
A grocery sells longganisas, bratwursts, and Hungarian sausages and can put on display 500 of them per unit of time. It can sell at most 300 longganisas and 120 bratwursts and, currently, there are...
-
Shine Co. Manufactures laser printers. It has outlined the following overhead cost drivers: Overhead Cost Pool Cost Driver Overhead Cost Budgeted Level for Cost Driver Budgeted Overhead Rate Quality...
-
For a given BST, write down an algorithm / code segment or complete method to return the sum of even values if the total number of node containing odd values are greater than the number of nodes...
-
Europa Company manufactures only one product. Presented below is direct labor information for November. Standard direct labor hours per unit of product Number of finished units produced Standard wage...
-
A body has a weight of 1 5 0 lbf . Determine: a ) Weight in Newtons b ) Mass in kilograms c ) Mass in slugs and lbs d ) If the body is under a net force of 5 0 lbf , what is the accelera on of the...
-
$35,000 Rent Expense $7,000 Wages Payable $15,000 Salaries Expense 2 Shetland Sweaters Ltd. has the following balances in the company ledgers for the year endir 2 3 Loan Payable (in 3 years) 4...
-
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 ....
-
Assume that you own and manage a small clothing store. A. What kinds of financial information would you want to run your business? B. What kinds of nonfinancial information would you want (for...
-
One of the first U.S. major industries to be regulated was the railroads. Farmers and manufacturers depended on railroads to get their products to market, and often there was only one railroad...
-
The chapter indicates that two very different objectives of accounting are to provide useful information for making decisions about the future, and to provide accountability for what happened in the...
Study smarter with the SolutionInn App