Question: In this assignment, you are asked to implement a graphical application that simulates a simplified version of DegreeWorks. Briefly, this GUI will take the inputs

In this assignment, you are asked to implement a graphical application that simulates a simplified version of DegreeWorks. Briefly, this GUI will take the inputs (i.e., course information), store them in an array list, and display course information in the output area. Figure 1 shows the layout of the DegreeWorks GUI.

In this assignment, you are asked to implement a graphical application that

You should have three Java files:

1. DegreeWorksFrame class that extends JFrame class (The main part of your program).

2. DegreeWorksViewer class, which contains the main method where a DegreeWorks object will be created, and the GUI will pop up (Suggested frame width of 450, and frame height of 400).

3. Course class, which is the class that models the Course objects (This file will be given to you). In your DegreeWorksFrame class file, you should have the followings:

Input area:

A text label and a text field (suggested width of 30) for course code;

A text label and a text field (suggested width of 30) for course name;

A text label and a text field (suggested width of 30) for course credit;

A text label and a text field (suggested width of 30) for course grade;

Buttons:

One button (AddCourse) used for adding a course into your course list, and append this course in the output area;

One button (CalculateGPA) used for calculating the overall GPA for all the courses in the course list, and append the GPA in the output area.

One button (ResetInput) used for resetting all input fields;

One button (ResetOutput) used for resetting the output;

Output area:

One text area (suggested row of 10 and column of 35) that displays course information or GPA; You may initialize the text area by including the headings (Code, Name, Credit and Grade).

A scrollpane that includes the output text area;

One ArrayList instance variable (e.g., courseList) to store the courses you add;

Four inner ActionListener classes, with each of them implements its method of actionPerformed. Specifically,

AddCourseListener: read the inputs and create a course object, add the course object into the courseList, and append this into the output area;

CalGPAListener: read all course credits and grades from the courseList, add them up and compute the overall GPA. You are assuming that A is 4, B is 3, C is 2, D is 1, and E is 0. GPA = Sum(creditpoint)/totalCredits. For instance (Figure 1), you have taken 3 courses: 130 (3 credits, grade of A), 131 ( 3 credits, grade of B), and 370 (4 credits, grade of B), then your GPA = (3*4+3*3+4*3)/(3+3+4) = 3.3.

ResetInputListener: reset all input fields;

ResetOutputListener: reset output area.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!