Below I have a snippet of the code needed in order to create Java Grades using the NetBeans IDE. When utilizing the NetBeans IDE, Java GUI’s can be rather simple to create. All that’s needed after the creation of the GUI are some scripts to give the GUI some functionality. The variables that I used are historyScore, mathScore, englishScore, physicsScore and biologyScore were String variables and the average and GPA variables were double. These variables can be whatever best suits the coders for ease of reading and execution.
String historyScore, mathScore, englishScore, physicsScore, biologyScore;
double gpa = 0;
historyScore = historyTF.getText();
mathScore = mathTF.getText();
englishScore = englishTF.getText();
physicsScore = physicsTF.getText();
biologyScore = biologyTF.getText();
double history = Double.parseDouble(historyScore);
double math = Double.parseDouble(mathScore);
double english = Double.parseDouble(englishScore);
double physics = Double.parseDouble(physicsScore);
double biology = Double.parseDouble(biologyScore);
Check out the rest of the code with this video!