Grade Average Calculator using Java

This tutorial will teach you on how you can create a “ Grade Average Calculator using Java with Netbeans IDE.

This program will calculate the Grade Average by Sum the Prelim, Midterm, and Final Grade and Divide it by 3.

Related Article: Basic calculator Using Java with GUI

Also, uses an “If Function Statement” to identify the grade average if it is Passed or Failed. The elements of the JFrame form compose of jTextField, jLabel, and jButton. Please follow all the steps to complete this tutorial

Grade Average Calculator Using Java Steps

  1. Create a new JFrame Form and Design it the same with the image below.

2. Double click your jButton and Insert the following codes below.

double average;
double prelim = Double.parseDouble(jTextField1.getText());
double midterm = Double.parseDouble(jTextField2.getText());
double finalg = Double.parseDouble(jTextField3.getText());
average = (prelim + midterm + finalg) / 3;
if (Double.parseDouble(jTextField4.getText()) <= 74.4){
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);

3. Run your program and the output should look like the image below.

About The Grade Average Calculator In Java

Project Name: Grade Average Calculator
Language/s Used: JAVA
Database: None
Type: Desktop Application
Updates: 0
Grade Average Calculator In Java– Project Information

For more information, feel free to leave your comment below, use the contact page of this website or use my contact information.
Email: [email protected] | Cell. No.: 09468362375


2 thoughts on “Grade Average Calculator using Java”

Leave a Comment