Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Generally: You will develop a GUI application that manages students . Start with some of the code we developed in class Create a custom


imageimageimageimageimageimageimageimage

Generally: You will develop a GUI application that manages students . Start with some of the code we developed in class Create a custom StudentException class that inherits from Exception . . Create a Student class that has private member variables of firstname / lastname / grade" and when validating the input values throws your own custom StudentException Create a StudentManager class that adds Student objects to an ArrayList Perform necessary "DATA VALIDATION" in all the SETTERS to not allow invalid values to exist within the objects Include and use the LOG4J JAR file in your project Setup the logging infrastructure just like we did in class (IMPORT statements and the STATIC logger object per class) Perform LOG4J logging to the maximum extent possible Your logging output text does not have to match mine console output text must match but all the other actual program The JPanel will contain widgets that handle the data of the first name, last name and grade and displays messages in the JTextArea (including exceptions) Generally, the FRAME, PANEL and widgets will look like this (remember you can resize the frame to look like this) :: FirstName: LastName: Grade: Add Show x Specifically: In the Student class :: Have all appropriate getters, setters and constructors Override the parent class's "toString()" method which returns a formatted string showing the internal state of the Student (see the screenshots) Remember - in the SETTERS - do necessary data validation to not allow invalid data to be set/exist within the object. Remember to throw the custom exception "StudentException" (see the screenshots) Do ERROR logging In the StudentException class :: Inherit from the Exception class In the StudentManager class :: have an ArrayList collection that can only contain Student objects have a method that can add Student objects to the collection that has the appropriate input arguments firstname, lastname and grade have a method that can create and output/return a list of student "toString()" strings, and the average class grade (see the screenshot) In the "Panel" class:: have all the appropriate widgets layed out in the manner like in the screenshots handle all the appropriate actions in the appropriate manner display all the appropriate output, including exceptions in the "text area" In the MAIN class's MAIN method: Declare, instantiate and launch the Frame Your program shall display the following output EXACTLY as shown Like so: FirstName: LastName: empty String THIS IS FROM THE Grade: EMPTY GRADE BOX x Add Show X FirstName: LastName: Grade: -999 Add Show First name cannot be blank FirstName: Sandy LastName: Grade: -999 Add Show Last name cannot be blank FirstName: Sandy LastName: Beach Grade: -999 Add Show Grade must be positive FirstName: Sandy LastName: Beach Grade: 123.45 Add Show Grade must be FirstName: Sandy FirstName: Paige LastName: Beach Grade: 98.6 Add Show Student added successfully x LastName: Turner Grade: 91.2 Add Show Student added successfully FirstName: Ford LastName: Karr Grade: 89.3 Add Show Student added successfully FirstName: Ford LastName: Karr Grade: 89.3 Add Show Student{firstName='Sandy', lastName='Beach', grade=98.6} Student{firstName="Paige', lastName=Turner', grade=91.2} Student{firstName='Ford', lastName='Karr', grade=89.3} Average class grade: 93.03 x x Plugins supporting *.log files found. 1 2023-03-28 20:40:37 [main] DEBUG Main: 9 LAUNCHING THE FRAME 2 2023-03-28 20:40:38 [main] DEBUG Frame Gui:12 3 LAUNCHING AND ADDING THE PANEL 2023-03-28 20:40:38 [main] DEBUG PanelGui:24 instantiating the widgets 4 5 2023-03-28 20:40:38 [main] DEBUG Student Manager: 11 inside the default constructor 2023-03-28 20:40:38 [main] DEBUG PanelGui:34 configuring the buttons 2023-03-28 20:40:38 [main] DEBUG PanelGui:44 adding the widgets to the panel 8 2023-03-28 20:40:57 [AWT-EventQueue-0] DEBUG PanelGui:86 9 10 11 12 13 2023-03-28 20:40:57 [AWT-EventQueue-0] ERROR PanelGui:107 - empty String 2023-03-28 20:41:04 [AWT-EventQueue-0] DEBUG PanelGui:60 - 2023-03-28 20:41:04 [AWT-EventQueue-0] DEBUG PanelGui:86 2023-03-28 20:41:04 [AWT-EventQueue-0] ERROR PanelGui: 107 2023-03-28 20:41:13 [AWT-EventQueue-0] DEBUG PanelGui: 60 14 2023-03-28 20:41:13 [AWT-EventQueue-0] DEBUG PanelGui: 86 6 7 2023-03-28 20:40:57 [AWT-EventQueue-0] DEBUG PanelGui: 60 handling the button clicks attempting to add a student to the manager handling the button clicks attempting to add a student to the manager empty String handling the button clicks 15 16 17 18 20 Last name cannot be blank. handling the button clicks 19 2023-03-28 20:41:22 [AWT-EventQueue-0] DEBUG Student Manager: 2023-03-28 20:41:22 [AWT-EventQueue-0] ERROR PanelGui:102 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG PanelGui: 60 21 22 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG PanelGui: 86 attempting to add a student to the manager 18 adding a student to the list First name cannot be blank handling the button clicks attempting to add a student to the manager 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG Student Manager:18 adding a student to the list 23 24 25 2023-03-28 20:41:30 [AWT-EventQueue-0] ERROR PanelGui:102 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG PanelGui:60 Grade must be positive handling the button clicks attempting to add a student to the manager 2023-03-28 20:41:13 [AWT-Event Queue-0] DEBUG Student Manager: 18 adding a student to the list. 2023-03-28 20:41:13 [AWT-EventQueue-0] ERROR PanelGui: 102 2023-03-28 20:41:22 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:41:22 [AWT-EventQueue-0] DEBUG PanelGui:86 Plugins supporting *.log files found. 19 220 First name cannot be blank. handling the button clicks attempting to add a student to the manager 18 adding a student to the list Grade must be positive handling the button clicks attempting to add a student to the manager. 18 adding a student to the list Grade must be < v 1.idea out src FrameGui log4j.xml Main PanelGui Student StudentException StudentManager .gitignore baretail.exe csis222proj06.iml csis222week10.iml >log4j-1.2.17.jar mytesterror.log mytestrolling.log

Step by Step Solution

3.44 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

Below is the Java code that aims to meet all the specified requirements in the question It includes enhancements for updating student information assigning grades error handling and basic documentatio... 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

Systems Analysis and Design

Authors: Scott Tilley, Harry J. Rosenblatt

11th Edition

1305494601, 9781305533936 , 978-1305494602

More Books

Students also viewed these Programming questions