Question
Can someone help fill in the blanks in java please? Thanks /** * This class deterimes a passing or failing grade for an exam *
Can someone help fill in the blanks in java please? Thanks
/**
* This class deterimes a passing or failing grade for an exam
* This class is a subclass of PassFailActivity
*
* @author ()
* @version ()
*/ (
1) ____________________________________________________________________
{
private int numQuestions; // number of questions
private double pointsEach; //points for each question
private int numMissed; //number of questions missed
/**
* The constructor sets the number of questions, the number of questions missed, and the minimum
* passing score.
* @param questions The number of questions
* @param missed The number of questions missed
* @param minPassing The minimum passing score
*/
(2) public PassFailExam(_______________________________________________________)
{
//Call the superclass constructor
(3) _____________________________________; //declare a local variable for the score
(4) _______________________________________; //Set the numQuestions and numMissed fields
(5) _______________________________________; numMissed = missed;
//Calculate the points for each question and the numeric score for this exam
pointsEach = 100.0 / questions;
numericScore = 100.0 - (missed * pointsEach);
//call the superclass's setscore method to set the numeric score
(6) ____________________________________________;
}
/**
* The getPointsEach method returns the number of points each question is worth
*/
public double getPointsEach()
{
return pointsEach;
}
/**
* The getNumMissed method returns the number of questions missed
*/
public int getNumMissed() { return numMissed;
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started