Question: IN JAVA: 1) Define a class Student that will hold the following information: studentID, firstName, lastName, and grade. Create a constructor to fill in each

IN JAVA:

1) Define a class Student that will hold the following information: studentID, firstName, lastName, and grade. Create a constructor to fill in each variable except for grade, which will default to 0. Define a method in Student called submitAssignment. We should be able to call submitAssignment with either 1 argument, grade, or 2 arguements, grade and latePenalty. The first implementation of submitAssignment with 1 argument should replace the current grade. The second implementation of submitAssignment with 2 arguments should replace the current grade with the grade minus the latePenalty.

Make sure your class name is Student, and the method name is submitAssignment. Don't submit screenshots, and be sure to double check your work runs.

2)

Define a class School that has a static field minimumGrade set to 50. Define a static method in School called checkPassing. The method checkPassing should take in 1 parameter which is Student. The method will check if a student has passed or failed by comparing their grade with the minimumGrade and print out pass or fail.

3)

Initialize a student object, call submitAssignment on it with a grade of 77, and use the static method checkPassing to print out the result. Initialize another student object, call submitAssignment on it with a grade of 66 and a penalty of 20, and use the static method checkPassing to print out the result.

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!