Question: In java Please You will be taking the student.java file and implementing the student ( ) constructor and the getGrade ( ) method. Part One:
In java Please
You will be taking the student.java file and implementing the student constructor and the getGrade method.
Part One:
Constructor:
The constructors role will be to initiate the object variables examGrade examGrade examGrade and homeworkGrade. Currently the constructor is setting the values equal to Change the constructor so that the variables are based on the file.
Example:
The file studenttxt have values
Exam One:
Exam Two:
Exam Three:
Homework:
When I pass in studenttxt as the constructor parameter, examOne should become examTwo examThree and homework
Method:
Using calcGrade, determine the students total average grade as a double. You should use the variables examOne, examTwo, examThree, and homework. Since these are global object variables, they are accessible from the method without needing to be passed in
Use the following to calculate the students grade
Exam One: of grade
Exam Two: of grade
Exam Three: of grade
Homework: of grade
Return a double representing their grade
THIS IS THE CURRENT CODE
import java.ioFile;
import java.ioFileNotFoundException;
import java.util.Scanner;
public class Student
private double examGrade;
private double examGrade;
private double examGrade;
private double homeworkGrade;
public StudentString filename
implement the constructor here
public double getGrade
implement the method getGrade
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
