Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input Files: 1. There are three input files that your program needs to read and analyze. (Fields here are separated by commas.) The first file

Input Files: 1. There are three input files that your program needs to read and analyze. (Fields here are separated by commas.) The first file contains the answers for the 20 questions and is called Answer.txt. The format of this file is shown below: TFTTTTTTFFTFTFTTTTFF Each character is a solution for the test. The first character being the solution for question #1 and the last character the solution for question #20 respectively. 2. The second input file is called StudentResponses.txt. The format is outlined below: 5 236499,TFTFTFTFFFFTFTFFFTF 643828,TFTFTTTTTF--FTFTFTTF 917057,FTF-FTTTFFFTF-FTFTFT 656565,FTF-FTFTFTF-TTFT-TTT 183742,FFTF-FFT-TFFFTFTFTFF The following details relate to StudentResponses.txt file: The data on the first line indicates the number of students who sat the test. Each line thereafter contains a 6 digit students id number followed by a comma and then the students responses to the test questions. The first character in the Students Answers column refers to question #1 in the test the last character to question #20 There could be dashes (-) between the T and F characters indicating that the student did not answer that question. In the above file, student with id# 643828 did not answer questions 11 and 12. Each correct response is worth 5 points, each incorrect response is worth -1 point and an unanswered question is worth 0 points. The maximum score attainable is 100 and the minimum 0. That is; even if a student gives an incorrect response to all 20 questions, his score will be 0, rather than -20. Your program should compare the students answers to the key provided and generate a total score for each student which needs to be stored. 3. The third input file is called StudentDetails.txt. The format is outlined below: 10 643828,Mary,Low,Samoa 123456,Milo,Thatch,Fiji 917057,Filo,Fill,Tonga 656565,Mary,Runaway,Fiji 183742,Cat,Women,Vanuatu 236499,John,Noo,Fiji 129856,Ray,Sting,Solomons 258796,Shrek,Nice,Tuvalu 345871,Dan,Coyote,Vanuatu 414141,Ben,Foo,Samoa The format of entries in the file is as outlined below: Number of students in class Student ID, FirstName, LastName, Country The contents of this file may not match the order of the ID# in StudentResponses.txt file. Output: You are then required to print in a label a grades result sheet which should contain a title, followed by the header identifying the columns ID#, Name, Score and Grade attained. After that each line contains the students test results. Grade is calculated based on the following grade_range table: Score Range Grade <39 E 40 49 D 50 56 C 57 63 C+ 64 70 B 71 77 B+ 78 84 A 85 100 A+ Average class score, minimum and maximum scores also need to be calculated and printed on the label. For students who have missed the test, the grade will be Ex. Also the calculation of average does not include student who have missed the test. Program Requirements/algorithm: 1. Create a MainMenu form. On this form implement the following functionality: a) Put a button titled Open Answers File. When this button is clicked; open Answer.txt, and read and store the answers in an array of Strings. Close this file. b) Put another button titled Open Student Responses File. When this button is clicked, do the following: i. Open StudentResponses.txt file. ii. Read the number of students who sat the test value and store it a variable. iii. Then use a loop to read the students responses to the questions. This loop runs up to the number of students who sat the test value read in i). For each line read, split the record into ID# and responses and store in ID and Responses array or into an test Structure array that has an ID and responses field. c) Put a third button titled Open Student Details File. When this button is clicked, do the following: a) Open and read StudentDetails.txt and store the data into appropriate arrays or into a StudentDetails structure array. d) A forth button titled Display Grades Results when clicked, should open up another form titled Grades Results Sheet on which in a label should display the grades results for the class in accordance with the sample output given. e) Finally put an Exit button to end the application. 2. On the Grades Results Sheet form, in addition to the label to contain the class results, have the following: a) A button called Close Form that when clicked would close the Grades Results Sheet form and return to the MainMenu form b) In this form, consider creating the following procedures: i. A function that calculates average score. ii. Another function that determines the minimum score. iii. And another to determine the maximum score. c) When this forms loads, you should write code in the form Load even to produce the necessary grade results output in the label Additional Notes: Make sure you include the statement Option Explicit On and Option Strict On at the start of your code file. This will ensure that all variables are declared before being used, helping to reduce errors. Also in steps 1 a), b) and c) use dialog boxes to retrieve the file paths. In all your program constructs you must write comments where necessary. Dont write comments for obvious code, but segments of code which seem complex. Also include yours and your partners name, student id# respectively as comments at the top of your program code.

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 Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions