Question: Objectives: Javadoc ArrayList File I/O UML diagrams Getting Started Begin by creating a new Java project in Eclipse, named according to the lab guidelines. Within

Objectives:

Javadoc

ArrayList

File I/O

UML diagrams

Getting Started

Begin by creating a new Java project in Eclipse, named according to the lab guidelines. Within the project, create CS3443Student.java and Gradebook.java. All of your classes will be in the default package of your project. Your application will read in data from text files placed in a data directory. Sample files can be downloaded as a zip file here - unzip it and place the folder with files at the top of your project in Eclipse.

To get you started, we've provided a test class, Lab2.java. Your final submission must include this class exactly as it appears here, and the data files given. The only permitted modification to this code is to add Javadoc comments as needed. Once your application is completed, running Lab2.java with the given data files will result in the exact output shown below.

Lab2.java

public class Lab2 { public static void main( String[] args ) { Gradebook gradeBook = new GradeBook(); gradeBook.loadStudents("data"); System.out.println( gradeBook ); } }

Update: A correction must be made to the code above, in order for it to compile. Java is case-sensitive, so in the 3rd line, where the Gradebook object is declared and initialized, it cannot be typed as "Gradebook" in the declaration and "GradeBook" in the initialization. Please choose one of these spellings, and use it throughout your code.

Output

CS3443Student.java

As a current student in the course, you have domain expertise, so this is a great place to start - begin writing out the code for CS3443Student.java. This class will represent a CS 3443 student, which will have:

Name, required for creation of CS3443Student object

ArrayList of lab grades (0-8 integer values)

ArrayList of quiz grades (0-9 integer values)

Midterm exam grade (integer value)

Final exam grade (integer value)

Team project grade (integer value)

This class is responsible for maintaining and calculating grades for a student. There is a lot to this, so let's break it down into subtasks (and methods!).

Create a method computeFinalCourseGrade() to compute the final overall grade for the student, following the grading policy in our syllabus. It should take no parameters, and return a double value. The parseFromFile(File) method should be a class method which takes as a parameter a File object and returns a new CS3443Student object. It should call the following methods as needed to gather needed information from the file. The parseLabs(String) and parseQuizzes(String) methods should take as a parameter a String, and return nothing from the method. The String is in the format "Labs,100,89,92,88" for parseLabs (and similar for parseQuizzes). Methods getLabAverage() and getQuizAverage() should take no parameters and return the average of the respective grades. Each student will have at most 8 labs and 9 quizzes. Students with fewer than the 8 labs and 9 quizzes should receive zeros for the missing grades. The toString() method should return a String formatted according to the sample output containing the student's name and their final course grade. Getter and setter methods for all class variables.

Gradebook.java

The Gradebook class will represent an gradebook, a collection of student grades. This class should maintain an ArrayList of CS3443Student objects, initialized by a constructor. Like the previous class, break up the tasks into smaller subtasks & methods.

The loadStudents(String) method should take as a parameter a String of the relative path of the directory of files. This method should not return anything, rather it should populate the students in the gradebook. The calculateClassAverage() method should take no parameters and return the overall average of all students in the course. The toString() method is responsible for formatting and returning a String in the format of the example output provided. Finally, include getter and setter methods for all class variables.

Enrollment: 9 Class average: 81.3 Final Student Grades Diana: 93.7 Greg: 99.3 Heidi 34.6 Eric:92.5 Alice: 91.1 Bob: 92.4 Isaiah: 63.2 Carlos: 82.8 Faith 82.0 Enrollment: 9 Class average: 81.3 Final Student Grades Diana: 93.7 Greg: 99.3 Heidi 34.6 Eric:92.5 Alice: 91.1 Bob: 92.4 Isaiah: 63.2 Carlos: 82.8 Faith 82.0

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 Databases Questions!