Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be Java FX Write a Java GUI program that will serve as a GPA calculator (using the 4.0 scale and only A, B,C, D,

Must be Java FX Write a Java GUI program that will serve as a GPA calculator (using the 4.0 scale and only A, B,C, D, or F letter grades) that can accept one semester of five (5) courses. The program will allow the user to enter the letter grade for each of their courses. The interface should calculate the GPA for that semester.Create a Semester class that can contain information about a students semester. Information in the class should include student name, course names (CSCI 1302, MATH 1161, etc.), credit hours, and final letter grades. Each of the non-course name items should be stored in separate collections. There should be methods to get total credit hours, calculate total quality points, and to calculate GPA as well as appropriate getters/setters for any data properties. The program should first create a Semester instance with your current course names, subjects, numbers, and credit hours. This instance can be created manually (aka hard-coded) in the program before setting up the GUI. These values should then be used to populate the GUI components. The final grades in the semester instance should be set after the user enters them and the Calculate button is clicked. Those grades should also be used to display values for the GUI components. The interface should contain one set of each of these controls for every course in the semester:

Course NameLabel or equivalent , value ispre-filled from Semester instance

Credit Hours TextField, Label or equivalent, value is pre-filled from Semester instance

Letter Grade TextField or equivalent, value is set by userThere should also be a Calculate and Reset button in the interface. The program should allow a user to set letter grades for each of the classes and click the Calculate button to calculate semester GPA. The Calculate button should populate the final grades for the created Semester instance, then use the GPA calculation method in the Semester class to calculate the semester GPA. The GUI program should then display the calculated GPA from the Semester instance visually. The Reset button should reset grades for the courses and the change the displayed GPA calculation to 0.00. Detailed Requirements and Notes:

This program should: o Display the student name at the top of the interface.

o Assume that there are always 5 courses being taken a semester.

o Pre-populate the class name and credit hours based on values in the createdSemester instance.

o Have a calculate button that, when clicked, calculates and displays the GPA to 2 decimals. The calculated value should be visible to the user in the interface (not printed to the console). The calculate operation should set values for the final letter grades within the created Semester instance based on user input. The GPA calculation should be calculated in the semester instance. o Have a reset button to reset all letter grades to their default state and set any calculated GPAs to 0.00.

Research how GPA is calculated with quality points, letter grades, and credit hours to fit the4.0 scale and use that calculation forthis program

There are no visual requirements for this project. Design your interface however you wouldlike with whatever controls you feel are best suited.

However, you should:

o Effectively use panes and spacing/padding/alignment options to present a clear and understandable interface; think of usability when designing.

o Consider error prevention/detection

o Test all cases (especially blank/null values) and handle them appropriately.

Use an online GPA calculator to check the results of your calculations.

Sketching the object will help you figure out which types of panes to use.

UI Components can be stored and retrieved from ArrayLists. This may make creating and accessing these components easier

View less Jan 24 2021 04:32 PM 1 Approved Answer

SAYED M answered on January 26, 2021 5 Ratings,(13 Votes) CODE:- //GPAGui.java import java.awt.Container; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import java.text.DecimalFormat; public class GPAGui extends JFrame...

plz solve it asap

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions