Write a program to keep records and perform statistical analysis for a class of students. The class may have up to 40 students. There are five quizzes during the term. Each student is identified by a four-digit student ID number. The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is to be read from a text file. The output from the program should be similar to the following: Here is some sample data - not to be used as sample for calculations: Stud Q1 Q2 Q3 Q4 Q5 1234 78 83 87 91 86 2134 67 77 84 82 79 1852 77 89 93 87 71 High Score 78 89 93 91 86 Low Score 67 77 84 82 71 Average 73.4 83.0 88.2 86.6 78.6 Use one and two-dimensional arrays only. Test your program with the following data - Program should print all the lowest or highest scores for each quiz. Here is copy of actual data to be used for input. Stud Qu1 Qu2 Qu3 Qu4 Qu5 1234 052 007 100 078 034 2134 090 036 090 077 030 3124 100 045 020 090 070 4532 011 017 081 032 077 5678 020 012 045 078 034 6134 034 080 055 078 045 7874 060 100 056 078 078 8026 070 010 066 078 056 9893 034 009 077 078 020 1947 045 040 088 078 055 2877 055 050 099 078 080 3189 022 070 100 078 077 4602 089 050 091 078 060 5405 011 011 000 078 010 6999 000 098 089 078 020 Some help with Assignment 4 --------------------------- You must apply the following concepts in Assignment 4. 1. Object Theory 2. File IO 3. Wrapper Classes. Here are the guidelines for working on Assignment 4. 1. Pl. read the requirements carefully, to find out what you are being asked to code. 2. Before starting your coding, pl. be sure to do your design keeping in mind the concepts that have to applied in this lab assignment. 3. You should consider writing a Student Class. Pl. keep the definition of Object in mind, as you work on the object properties. 4. Provide a set of methods that will be responsible for reading/writing data from/to a text file. You may consider writing a separate reusable utility class for the purpose. 4a. To read data from a text file you may want to read a line and then tokenize the line (breaking it into smaller strings) using StringTokenizer and storing the results in an array of Objects. 4b. Plan to write the output to a file or console (whatever works for you.) 5. Consider placing your analysis methods in a class that makes sense to you. Would the student class be better or utility class or some other new class? This is a design decision you need to make. 6. Be sure to test your code. 7. Pl. do not write entire code in main for this lab. The purpose of the lab is to understand application of object theory. Main should not be more than 20-30 lines of code. |
Assignments >