Question
I want to ask some question about this how to setup for the char type. String cName; / String tName; int[] numtest; char[] corrAns; String[]
I want to ask some question about this how to setup for the char type.
String cName; / String tName; int[] numtest; char[] corrAns; String[] sNum; String[] sName; char [][] perAns; int total; double average; dataFile = new ASCIIDataFile(); display = new ASCIIDisplayer(); printer = new ReporPrinter(); msg.writeString("Processing......"); cName = dataFile.readString(); tName = dataFile.readString(); numtest = new int [ntest]; corrAns = new char[corAns]; sNum = new String [nsNum]; sName = new String[nsName]; perAns = new char[nsNum][nsName]; char correAns = { 'A', 'B', 'C', 'D',};
The input to the program is an ASCIIDataFile. The first line contains the course name (String), the second line contains the test name (string). Following that is the number of questi ons in the test (int) and, for each question on the test the correct answer (char: A, B, C or D). Then, for each student in the course, there is the student's student number (string) and name (string) followed by four lines (corresponding to answers A, B, C and D) with one character per questi on (char: O for scratched andx for not scratched). The data (with one student) might look like: COSC 1PO3 Term Test 0 0 0 0 0 0 0 where the Cosc 1P03 Term Test has 5 questions whose correct answers are: 1:A, 2:B,3:C, 4 :D and 5:A. Student 111111: Fred Flintstone scratchedoff Aon question 1; c and D on question 2; C and D on question 3; A, B, C and D on question 4 and A, B and C on question 5. The students' responses are marked in the following way. Each question has a maximunm value of3. Ifthe student did not select the correct answer, s/he is awarded 0 for theStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started