Java Grades Tutorial

How to create a java grades program

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 average;

        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!

No comments:

Post a Comment

Best Devices To Get Started With Programming

Having a good solid computer is vital to start coding, and HP offers solid laptops for coders at every level.