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. Rightclick the link and choose Save As The file consists of 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 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: : Welldesigned functions to do the work and avoid repetition of code : Tests for your functions : Accomplishing main task from the "real" program The points for functions and tests are independent of the "completion" points. If you only do ~ 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 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 subtask, is there a function that handles that subtask? 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 doxygenstyle comment? Do functions avoid code repetition? ie Do they call other functions instead of duplicating the code from them. Are your functions testable? Functions that directly handle program inputoutput 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 itIf 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 TESTCASEs below const Student TESTSTUDENTSBob Jones", Suzie Chavez", Reggie Smith", ; TESTCASEgetAverageQuizzes Use the test array double average getAverageQuizzesTESTSTUDENTS, ; CHECKaverage Approx; Give the function the array and just pretend it only has two elements should just average two students double average getAverageQuizzesTESTSTUDENTS, ; CHECKaverage Approx; Link to full example. BuildingTesting 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: I could test that function by doing: TESTCASEpersonString Person p David Ramirez", ; string s personStringp; CHECKs "Name: David Ramirez
Age: ; 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: GAMENAME from SCHOOLNAME Total Score: TOTALSCOREFORTEAM Best Category: BESTCATEGORY The parts in ALLCAPS should be replaced by the appropriate values for that team. BESTCATEGORY should describe the scoring category ProgrammingArtGame DesignProject Management Use of Theme that
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
