Question: In C + + please! Add the file teamdata.txt to your project. ( Right - click the link and choose Save As ) The file

In C++ please! Add the file teamdata.txt to your project. (Right-click the link and choose Save As) The file consists of 20 records that look like the one defined in Part A. Your program should not count on having that exact data. I will grade your project with my own version of the file (it will also have 20 records). This means you are free to modify the file while testing your code, but your program MUST run correctly on a file with the original format. Your project should open the file and print out the information described below in the section titled Task. Scoring The points possible on this assignment are broken up as follows: 40%: Well-designed functions to do the work and avoid repetition of code 20%: Tests for your functions 40%: Accomplishing main task from the "real" program The points for functions and tests are independent of the "completion" points. If you only do ~1/2 of the overall task, but write quality functions to do the work that your program does and have tests for those functions, you could still get full credit on the first two criteria. You might in that case earn 80%(40+20+40/2). You are encouraged to work iteratively. Tackle one part of the task at a time. (You don't necessarily have to work in order!) As you work on a part, start by building and testing functions to do any work that is needed other than printing. Once the functions are built and tested, use them to solve that part of the task in your "real" program. Function Design main should not do much complex work - you must use functions to break up the work you do and avoid repetition. Your function design will be part of your score. It will be evaluated on these criteria: Does each function have a clear job? If there is a distinct complex sub-task, is there a function that handles that sub-task? Does each function have a clear "contract"? Does it use its parameters and return value to implement clean information passing? Does each function have a doxygen-style comment? Do functions avoid code repetition? (i.e. Do they call other functions instead of duplicating the code from them.) Are your functions testable? Functions that directly handle program input/output, either from the console or a file, are hard to test. If you have such functions, they should NOT include any other complex logic. Instead, they should just do the input or output and leave other functions to process the data or produce the output. As much as possible, you should consider calculating and printing two different jobs. Use functions to calculate what you need to print and return that to be printed elsewhere. Unit Tests Every testable function should have a unit test. If a function reads data in from a file or prints data out, you do NOT have to provide a test for it.(If most of your functions do output, you are probably not going to score well on the Function Design part of the assignment or this part!) To test functions that take an array, you should make a const global array of teams in the tester file. Like this: // Can be used in any TEST_CASEs below const Student TEST_STUDENTS[3]={{"Bob Jones", 84,92},{"Suzie Chavez", 94,88},{"Reggie Smith", 90,89}}; TEST_CASE("getAverageQuizzes"){// Use the test array double average = getAverageQuizzes(TEST_STUDENTS, 3); CHECK(average == Approx(89.333333333)); // Give the function the array and just pretend it only has // two elements - should just average two students double average2= getAverageQuizzes(TEST_STUDENTS, 2); CHECK(average2== Approx(89)); } Link to full example. Building/Testing Multiline Strings Remember that
means newline. If you want to build up a string with multiple lines and then test it, use that symbol. For example, if I have a string personString that takes a Person and returns this: Name: David Ramirez Age: 31 I could test that function by doing: TEST_CASE("personString"){ Person p {"David Ramirez", 31}; string s = personString(p); CHECK(s == "Name: David Ramirez
Age: 31"); } Task for Main Program Read the data from the file teamdata.txt into some combination of arrays and structs. Produce the output described below based on that data. Each section of output should be preceded by a title that says what is being printed: Team Data ===================================================//team data here Average Scores ===================================================//average scores here ... Team Data For each team, print out something like the following: GAME_NAME from SCHOOL_NAME Total Score: TOTAL_SCORE_FOR_TEAM Best Category: BEST_CATEGORY --------------------------------------------------- The parts in ALL_CAPS should be replaced by the appropriate values for that team. BEST_CATEGORY should describe the scoring category (Programming/Art/Game Design/Project Management/ Use of Theme) that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!