Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

() 1/2 CSCI 201 - Computer Science 1 Project 1: A program that processes student data. Q 1. and 2. Due on Monday February 20

image text in transcribedimage text in transcribed

() 1/2 CSCI 201 - Computer Science 1 Project 1: A program that processes student data. Q 1. and 2. Due on Monday February 20 in the Project1 folder in your StudentWorkFolder in CourseFiles. Q 3, 4, 5: Due on Monday February 27 in the Project1 folder in your StudentWorkFolder in CourseFiles. Q 6: Due on Monday March 6 in D2L (See CourseInfo/FirstProject for a similar project.) NOTE: Please read the entire assignment before you start working. IMPORTANT: Wateh Leeture 2 from Week 5 and Leeture 1 from Week 6 carefully before starting on this. The Problem. In this assignment, 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: Quincy, Jane XPL27856 815876407349918489939079948173 Output Speciflcations. The output of the program is a file with the following data in each row The output for the above input would look like this: Pondicherry, John XPQ23456 38.65 39.7 78.35 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; 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) 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 al grade of Z. As an example, the data record Pondi, Joe XPQ23456 914876023919184959381768410173 generates the output line Pondi, Joe XPQ23456 38.651.01.0Z (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 Project1. 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. 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 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. Reflection on problem solving process used so far (see D2L assignment for details). Due on Monday March 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions