Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You will be creating a grade book that will use array lists to store students an

ID: 3530312 • Letter: Y

Question

You will be creating a grade book that will use array lists to store students and their grades. These students and their grades will be stored and retrieved from a file. The breakdown of the midterm project is as follows. You must be able to add a student, remove a student, edit a student, remove all students, load students from file, save students to a file and exit the program. We are going to assume that each student has 10 possible assignments with a possibility of 10 points per assignment. I guess my question to this is where do I get started?

Explanation / Answer

public void inputStudents() throws FileNotFoundException //This will work to interactively input Students


{


Scanner inF = new Scanner(new File("C:\Users\Caili\Documents\Sophmore\AP Computer Science\Unit 4\TextFile.txt"));


while(inF.hasNextLine( ))


{


Student aStudent = new Student();


aStudent.inputInfo("Name",inF.nextLine( ));


aStudent.inputInfo("Tests",inF.nextLine( ));


aStudent.inputInfo("Programs",inF.nextLine( ));


aStudent.inputInfo("Homework",inF.nextLine( ));


aStudent.computeAve();


aStudent.computeGrade();


myStudents.add(aStudent);

[COLOR="#00FF00"]It says that this line is null when I try to run it. I know that myStudents.add(new Student()) would work, but then how do I input the info into the object?[/COLOR]

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote