This is a C++ program. Do NOT use classes, structs, vectors, sstream library, or the define directive. You must only use ARRAYS to store data.
The first two photos provide the instructions on how to build the program. The 3rd image consists of all 5 txt files used in the program. The last image is a sample exe solution on how the program should run. It does not include the table at the end, but please include the final table in the program that lists the items in the course, the item's weight, the grade that the student got for that item, and the points that the student earned as a result. The table should also include the course grade for that student and whether or not the student passed the exam (the passing grade is 70%). If the input of the number of students is greater than 3, do not include the rest of the students into the graph. Thank you!
Multiple Student Course Grading Program with File 10 Directions Write a complete program to help your professor(s) calculate the course grade of their students. In your program, you MUST have arrays that store the data read from the file and close the file as soon as possible (you may use strings for the student name and file names). Create your project on the desktop. Open the input and output files through IDE ONLY, Meet with a team member with a windows system to view the executable file if you need to view my sample file. Please start early and adhere to all requirements on this exam and NOT the SAMPLE executable file. - Each faculty member has thei grading policy (number of items that get graded and points for each item). See and use the attached two grading scheme files, "syllabus.txt" and "syllabus 2.txt". - You may assume that each item is one "token" (no spaces, see "syllabus 2.txt") - You may assume that the total points end up to 100 (no need for you to validate that). - The student answer input file has in the first line the name of the student and in the next lines the grade that he/she got in the corresponding part - You may assume that each student file has at least as many grades as the items to be graded (you do not need to validate that). If there are more grades in the student file you may assume that they belong to extra credit and you can ignore them. - You may use my input files and modify them for your various testing needs. Note that the input file names may contain spaces. - The data files will have each grade in a separate line. Your program should... 1. Ask the user where the point allocation data for each item is stored, - Read that file name, (remember to have the file names hardwired in the code as constants) - Open that file and - Make sure it exists. - If it doesn't, output an error message and keep on asking for the correct filename till it is provided - If it does, read the data from that file and Close that file. - Ask the user how many students are in that course. Validate your input. Keep on asking for valid input till it is provided. Make sure the Number of student files doesn't exceed 3. - Attempt to open a file named Student \#i.txt (your code automatically generates the file names; you do not have to ask the user for that filename), where i is an iterator (goes from 1 to the total number of students in the class. BIG HINT: You will need to use the to string function, defined in the string library. That function takes an integer as an argument and returns it as a string. For example, to_string(15) returns "15". - You can use any function with the condition that you explain how it works and why you used it. - Makes sure it exists. - If it doesn't, output an error message and goes to the next student (a student may not have taken the exam) - If it does, read the data from that file into the answer key array and 2. Finally, your program will use each of the student's full name to create a corresponding file (make sure you append ".txt" after the name of the student before you create the output file) 3. And output in that file the information in a similar way as my sample program does (nice table) - The name of the student - The list of items in the course, the item's weight, the grade the student got for that item, and the points the student earned as a result. - The course grade for that student - And whether or not the student has passed or not the exam (the passing grade is 70% ) 4. A function that loads the answer key - this function should take the file name that contains the point allocation as an argument as well as any other arguments you find necessary. 5. You can use any function or member function with the condition that you explain how it works and why you used it. 6. A function that "grades" the student - that function will also output the information described above to the file with the student's name as filename (can do the open as well) 7. Any other function(s) that you find useful Then your program: Your program MUST use functions... Think about your functions' design (number of arguments, return types, etc.). As you do that, think about how your code will be easily modifiable/expandable/etc. - Your program should compile with NO errors and NO warnings. - Do not forget that code design/clarity/readability is part of your grade - Do not forget that output design/clarity/readability is part of your grade When you are done... - Submit the .cpp copy of your file Where is the worth of each course part stored? [I will skip initial white space, filename may contain spaces] Test! Unable to Open Test! Please enter the right file name for the sylabus: syllabus2.txt I am getting the answer key from syllabus2.txt This course has 5 parts How many students do you have? [I will NOT validate for numeric input, positive, and whole number] Enter a VALID Number! : 4 I'm Opening "student\#1.txt" answers Mike Brown Jr.'s results were stored in coreesponding file. I'm Opening "student\#2.txt" answers James Brown Jr.'s results were stored in coreesponding file. I'm Opening "student\#3.txt" answers Mr. Smarty pants's results were stored in coreesponding file. Unable to Open student\#4.txt