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,...
-
Dunn Sporting Goods sells athletic clothing and footwear to retail customers. Dunns accountant indicates that the firms operating cycle averages six months. At December 31, 2011, Dunn has the...
-
Over a two-year period Sears reported an 83 percent earnings drop: Net income of $309 million on sales of $10 billion dropped to net income of $53 million on sales of $8.8 billion. It so happened,...
-
Sheldon Products produces plastic containers through a blow-molding process. The company uses process costing because its products are generally homogeneous and are produced in large batches. Malachi...
-
Tran Corporation is authorized to issue both preferred and common stock. The par value of the preferred is $50. During the first year of operations, the company had the following events and...
-
In the database you have built, you need to create a relationship between two fields in two tables. Field 1 in Table A has the Number Data Type and Field 1 in Table B has the Currency Data Type. Will...
-
The Sentry Lock Corporation manufactures a popular commercial security lock at plants in Macon, Louisville, Detroit, and Phoenix. The per unit cost of production at each plant is $35.50, $37.50,...
-
Consider the resource allocation graph shown in Figure 1: Figure 1: Processes and resources allocation graph: Assume all processes makes no further requests. Is the current system state is deadlocked...
-
The Fibonacci sequence is the series of numbers which can be found by adding up the two numbers before it as shown below: \[ 0,1,1,2,3,5,8,13,21,34, \ldots \] Write a complete program to compute the...
-
Repeat the previous exercise using a case structure instead of a selection structure. Data From previous exercise Write a code segment to ask a user to enter a number between 1 and 12 , and print the...
-
Implement each of the following statements in the Java language: A. Declare a variable weight of type double. B. Declare a constant EULER_NUMBER of type double and assign it the value 2.7182 .
-
In late 2004, British fashion designer Sara Berman received an unexpected telephone call from Andrea Ragnetti, chief marketing officer for Royal Philips Electronics. Figuring the Dutch company wanted...
-
The Woberg Company, located near Aarhus, Denmark, manufactured dishwashers and garbage pulverizers for home use, and cooking equipment and commercial pulverizers for restaurants. A relatively young...
-
Sate Awards has had a request for a special order of 10 silver plated temphies from the provincial tennis asmcation. The normal selling price of cha unh44.00 shown below Direct materials Direct...
-
Pappa's Appliances uses the periodic inventory system. Details regarding the inventory of appliances at January 1, purchases invoices during the year, and the inventory count at December 31 are...
-
A tax auditor reviewing a tax return looks for several kinds of problems, including these two: (1) mistakes made in entering or calculating numbers on the tax return and (2) places where the taxpayer...
-
The weights of individual M&M plain candies were obtained by placing each candy in a paper cup, then obtaining the weight without accounting for the weight of the cup. Identify at least one likely...
-
For a flight on a small plane, the pilot asks passengers what they weigh. Identify at least one likely source of random errors and also identify at least one likely source of systematic errors.
Study smarter with the SolutionInn App