Asked by Yokai
btnCalculate.addActionListener(new ActionListener)() {
public void actionPerformed(ActionEvent e) {
double recitation = Double.parse
Double(txtRecitation.getText());
double review = Double.parseDouble(txtReview.getText());
double homework = Double.parseDouble(txtHomework.getText());
double participation = Double.parseDouble(txtParticipation.getText());
double quizzes = Double.parseDouble(txtQuizzes.getText());
double prelim = Double.parseDouble(txtPrelim.getText());
double midterm = Double.parseDouble(txtMidterm.getText());
double finals = Double.parseDouble(txtFinals.getText());
double classStanding = (recitation*0.1)+(review*0.3)+(homework*0.1)+(participation*0.1)+(quizzes*0.4);
double termGrade = classStanding*2 + (prelim+midterm+finals)/3;
double generalAverage = (prelim*0.3)+(midterm*0.3)+(finals*0.4);
txtResult.setText("Class Standing: " + classStanding + "\nTerm Grade: " + termGrade + "\nGeneral Average: "+ generalAverage);
if(generalAverage >=75) {
txtRemarks.setText("Passed");
}else {
txtRemarks.setText("Failed");
}
}
}
Need Assistance I have Multiple Markers on the First Line and Third Line
public void actionPerformed(ActionEvent e) {
double recitation = Double.parse
Double(txtRecitation.getText());
double review = Double.parseDouble(txtReview.getText());
double homework = Double.parseDouble(txtHomework.getText());
double participation = Double.parseDouble(txtParticipation.getText());
double quizzes = Double.parseDouble(txtQuizzes.getText());
double prelim = Double.parseDouble(txtPrelim.getText());
double midterm = Double.parseDouble(txtMidterm.getText());
double finals = Double.parseDouble(txtFinals.getText());
double classStanding = (recitation*0.1)+(review*0.3)+(homework*0.1)+(participation*0.1)+(quizzes*0.4);
double termGrade = classStanding*2 + (prelim+midterm+finals)/3;
double generalAverage = (prelim*0.3)+(midterm*0.3)+(finals*0.4);
txtResult.setText("Class Standing: " + classStanding + "\nTerm Grade: " + termGrade + "\nGeneral Average: "+ generalAverage);
if(generalAverage >=75) {
txtRemarks.setText("Passed");
}else {
txtRemarks.setText("Failed");
}
}
}
Need Assistance I have Multiple Markers on the First Line and Third Line
Answers
There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.