Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I have attached a word document of the program.

I have attached a word document of the program. This program can be

used and edited as needed to fit the criteria. The PDF file is the instructions

This programming project involves writing a program to manage a student database. The interface to the program should be a GUI that looks similar to the following:
A combo box should allow the user to select one of the four database actions shown. The database should be implemented as a HashMap, with the ID field as the key and a student record consisting of a name and major as the value. The operation should be performed when the user clicks the Process Request button. If the user attempts to insert a key that is already in the database an error message should be displayed using a JOptionPane message dialog box. If the user attempts to delete, find or update a record that is not in the database, a message should also be displayed. After each successful operation is completed a JOptionPane window should be displayed confirming the success. In the case of a successful Find request, a window should pop up containing the student’s ID, name, major and current GPA. When the user selects the Update request, the following JOptionPane windows should be displayed to gather information about a course that has just been completed:
1
This program must consist of two classes.

-The first class should define the GUI and handle the database interactions.
-The second class named Student, should define the student record. It must have instance variables for the student name, major and two variables that are used to compute the GPA. A variable that contains the total number of credits completed and a second variable that contains the total quality points, which are the numeric value of the grade received in a course times the number of credit hours. It should not contain the student ID. The class should have the following three methods:
-A constructor that is used when new student records are created. It should accept the name and major as parameters and initialize the fields that are used to compute the GPA to zero.
-The second method courseCompleted should accept the course grade and credit hours and
-update the variables used to compute the GPA. It will be called when an Update request is
-made.
-The third method should override toString and return a labeled string containing the
-student name, major and GPA. Finally when a student has not yet completed any course, the GPA should be displayed as 4.0.
The google recommended Java style guide, provided as link in the week 2 content, should be used to format and document your code. Specifically, the following style guide attributes should be addressed:

- Header comments include filename, author, date and brief purpose of the program.
- In-line comments used to describe major functionality of the code.
- Meaningful variable names and prompts applied.
- Class names are written in UpperCamelCase.
- Variable names are written in lowerCamelCase.
- Constant names are in written in All Capitals.
- Braces use K&R style.
-In addition the following design constraints should be followed:
- Declare all instance variables private
- Avoid the duplication of code
- Also any exceptions thrown by nonnumeric inputs should be properly handled
-Test cases should be supplied in the form of table with columns indicating the input values, expected output, actual output and if the test case passed or failed. This table should contain 4 columns with appropriate labels and a row for each test case. Note that the actual output should be the actual results you receive when running your program and applying the input for the test record. Be sure to select enough different scenarios to completely test the program.
-Submission requirements
-Deliverables include all Java files (.java) and a single word (or PDF) document. The Java files should be
– 2 named appropriately for your applications. The word (or PDF) document should include screen captures showing the successful compiling and running of each of the test cases. Each screen capture should be properly labeled clearly indicated what the screen capture represents. The test cases table should be included in your word or PDF document and properly labeled as well.

StudentApplication.java// Required Java Classesimport java.awt.*;import java.awt.event.*;import java.util.*;import java.util.Map.*;import javax.swing.*;public class StudentApplication extends JFrame {     // Create JTextField       private JTextField studentIdTxt = new JTextField();   private JTextField studentNameTxt = new JTextField();   private JTextField studentMajorTxt = new JTextField();   // Create ComboBox   private static JComboBox<String> selection = new JComboBox<String>();   private static JComboBox<String> grade = new JComboBox<String>();   private static JComboBox<String> credits = new JComboBox<String>();   // Create JButton   JButton procesRequest = new JButton(“Process Request”);   // Declare Map   Map<Integer, String> student = new HashMap<Integer, String>(); //Use a Map<Integer, List(with 2 strings)>   Map<Integer, Student> allStudents = new HashMap<Integer, Student>();   // StudentApplication Constructor   public StudentApplication(){       dropItems();       panel();       listeners();   } // End StudentApplication Constructor     // Main Method   public static void main(String[] args){       // Create and Display Application GUI       StudentApplication studentGUI = new StudentApplication();       studentGUI.pack();       studentGUI.setTitle(“Project 4”);       studentGUI.setSize(300, 300);       studentGUI.setLocationRelativeTo(null);       studentGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);       studentGUI.setVisible(true);         } // End Main Method     // Panel Method   private void panel(){
Background image of page 1
       // Create panel to hold components       JPanel componentsPanel = new JPanel();       componentsPanel.setLayout(new GridLayout(9, 2)); // Nine rows, two columns       componentsPanel.add(new JLabel(“Id: “));       componentsPanel.add(studentIdTxt, BorderLayout.EAST);       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(new JLabel(“Name: “));       componentsPanel.add(studentNameTxt, BorderLayout.EAST);       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(new JLabel(“Major: “));       componentsPanel.add(studentMajorTxt, BorderLayout.EAST);       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(new JLabel(“Choose Selection: “));       componentsPanel.add(selection, BorderLayout.EAST);       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(Box.createHorizontalStrut(5));       componentsPanel.add(procesRequest, BorderLayout.WEST);       componentsPanel.add(Box.createHorizontalStrut(5));       add(componentsPanel, BorderLayout.NORTH);   } // End PanelHoldNorth method     // Items in ComboBox   private void dropItems(){       selection.addItem(“Insert”);       selection.addItem(“Delete”);       selection.addItem(“Find”);       selection.addItem(“Update”);   }// End dropItems Method     // Items in ComboBox Grade   private void gradeItems(){       grade.addItem(“A”);       grade.addItem(“B”);       grade.addItem(“C”);       grade.addItem(“D”);       grade.addItem(“F”);   }     // Items in ComboxBox Credits   private void creditsItems(){       credits.addItem(“3”);       credits.addItem(“6”);   }   // Listener Method     private void listeners(){
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"