Question: The Problem: Your Student class will store information about a single Student for use in a grade book program for Dr. Goode, a popular English

The Problem: Your Student class will store information about a single Student for use in a grade book program for Dr. Goode, a popular English professor who has finally been convinced that he should be keeping track of grades on the computer instead of in his (rather illegible) old- fashioned grade book. Of course, Dr. Goode is not comfortable with these new-fangled machines, so he doesn't want to have to enter formulas or have a program that is flexible. He needs a program designed specifically for grading his courses. Your program will start by reading a file of course information (format described below, and sample file provided on website). The user should be asked for the name of the input file when the program starts. The program will then provide a menu-driven interface which will allow Dr. Goode to do various grading tasks. Read through the entire assignment carefully, then create the classes in the order provided, testing each part carefully as you go. All of Dr. Goode's courses are graded in the same general way. There are up to 8 papers, each graded out of 40 points. The papers are worth 30% of the grade. There are up to 45 quizzes, each graded out of 5 points. The quizzes are worth 40% of the grade. There are up to 4 exams, each graded out of 100 points. The exams are worth 30% of the grade Student class The Student class will maintain information about an individual student's grades. The class will have knowledge of Dr. Goode's specific grading schema, though the percentages and max points for each type of assignment should be stored in constants in the class, so that the program can be quickly and easily modified should Dr. Goode ever change his basic grading schema (this is unlikely, but has actually happened once before about 10 years ago).

So the class should define the following named constants. Remember that there should be just one copy of each constant for the whole class, not one per object. Also remember that these constants should still be information kept only in the class, not something available to other classes. The max points per quiz The max points per paper The max points per exam The percentage of the grade that is quizzes The percentage of the grade that is papers The percentage of the grade that is exams Instance variables The last name of the student The first name of the student The student ID (make this a String) The number of absences a student has The number of exams a student has grades for An array of exam scores The number of quizzes a student has grades for An array of quiz scores The number of papers a student has grades for An array of paper scores Use appropriate types for each instance variable, and make sure that all attributes are private. Methods: A default constructor A constructor that takes the Student's names and ID and sets absences and numbers of grades to zero. Accessors: o getters for last name, first name, id, and number of absences o getQuizScore - this method will need to take an integer parameter that indicates which quiz score to retrieve ogetExamScore - this method will need to take an integer parameter that indicates which exam score to retrieve o getPaperScore - this method will need to take an integer parameter that indicates which paper score to retrieve Mutators setQuizScore - this method will need to take an integer parameter that indicates which quiz score to change o setExamScore - this method will need to take an integer parameter that indicates which exam score to change osetPaperScore - this method will need to take an integer parameter that indicates which paper score to change

A calcGrade method that returns the Student's current grade in the course. A read method that accepts a Scanner object and reads all data about one Student and stores that data in the object (see below for data format). A toString method that returns a String containing all data about the student in a nice neat format. Note that this should include the Student's overall course grade. A recordAbsence method that takes no parameters and adds one to the student's absences. A recordQuiz method that takes the quiz score the student received and adds it to the student's quiz scores A recordpaper method that takes the paper score the student received and adds it to the student's paper scores. A recordExam method that takes the exam score the student received and adds it to the student's exam scores. File format for student data: Last Name First Name ID Number of Absences Number of Quiz scores Quiz score 1 Quiz score 2 Number of paper scores Paper score 1 Paper score 2 Number of Exam scores Exam score 1 Last exam score Next student's last name Course class The course class will manage information about one course that Dr. Goode is teaching Constant A static constant representing the maximum number of students that can be in one of Dr. Goode's courses (40) Instance variables Your Course class must have exactly the following private instance variables. The name of the course

The number of students in the course An array of Student objects The number of quizzes given in the course (so far) The number of quizzes given in the course (so far) The number of papers given in the course (so far) Methods Your course must have the following methods. They are public unless otherwise specified. Do not add additional methods without consulting me. A default constructor A constructor that takes only the name of the course Getters for the attributes other than the array of Students A setter for the course name A read method that accepts a Scanner and reads in all information about a Course. The format of this information will be as specified for the file below. The Student information will be in the form used by the Student class's read method. Make sure that you create each Student object before attempting to read into it. A recordExam method that accepts a file name. The file will contain a list of exam scores in the same order as the Students in the course file. You must add the appropriate exam score to each student in the course. recordQuiz and recordPaper methods similar to recordExam. A private method that accepts a student ID and returns the Student object with that ID (null if not found). A correctExamScore method that accepts a studentID, an exam score, and an index between 0 and numExams-1, and updates the appropriate exam score. correctQuizScore and correct PaperScore methods similar to correctExamScore. A getCourseGrade method that accepts a studentID and returns that student's current grade in the course. A printStudent Report method that accepts a studentID and prints all information about that student to the screen. A printCourseReport method that lists the names, ids, and current course grades of all students to the screen GraderApp Class The GraderApp class will use the Student, Course, and TextMenu(from program 5) classes to create a program that presents a menu that allows the user to do the following: Enter a set of scores for an exam, paper, or quiz for all students These scores will come from a file, which will be in the same order as the initial data file (guaranteed). The user will need to supply the name of the file. Correct an exam, paper, or quiz score for a student. The user will need to supply the student's id, information about which exam/quiz/paper needs to be corrected, and the

correct score. Remember that users think the first item is item number 1, not item number 0. Get a particular student's current course grade. The user will need to supply the student's id. Print to the screen all information about a student. The user will need to supply the student's id. Print a listing of all student names, ids and current course grades. Quit the program Note that you may want to use more than one instance of the TextMenu class. You should use your work on program 5 to help you design this part of the program. Extra credit opportunities There are two extra credit options. Extra credit will only be considered for A or B programs that are turned in on time. Add an option to your program to sort the student array. This will involve writing a sortStudents method in Course. (up to 5 points) Add an option to your program to write all of the information about the course to a file (name specified by the user). This file must be in exactly the same format as the data read in. You will need to add methods in Student and Course to print the data properly to a file. (up to 5 points) File format for course data: Course Name NumQuizzes NumPapers NumExams Student 1 Information in format As specified above Student 2 Information in format As specified abov Last student's Information in format As specified above Class Diagram Create a class diagram showing all classes used in the program and the relationships among them. Only show details for the classes you wrote. Submission:

- coursefile - Notepad File Edit Format View Help British Literature to 1800 5 1 1 Hawkins Ann 987654321 0 5 5 4 5 3 5 1 38 1 93 Smith William 123456789 1 5 4 3 4 5 4 1 32 1 87 Meador Tammy 555555555 2 5 0 5 4 5 1 3 39 1 98

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!