Generally: You will develop a GUI application that manages students . Start with some of the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 <= 100 x FirstName: Sandy LastName: Beach Grade: 123.45 Add Show Grade must be <= 100 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 <= 100 2023-03-28 20:41:22 [AWT-EventQueue-0] DEBUG StudentManager:18 - adding a student to the list 2023-03-28 20:41:22 [AWT-EventQueue-0] ERROR PanelGui: 102 21 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG PanelGui:60 22 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG StudentManager: 2023-03-28 20:41:30 [AWT-EventQueue-0] ERROR PanelGui: 102 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG PanelGui:60 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG Student Manager: 2023-03-28 20:41:36 [AWT-EventQueue-0] ERROR PanelGui:102 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG StudentManager:18 - adding a student to the list 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG PanelGui: 98 33 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG PanelGui: 86 attempting to add a student to the manager 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG StudentManager: 18 adding a student to the list. 23 24 25 26 27 28 29 30 31 32 34 35 36 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG PanelGui: 98 37 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG PanelGui: 60 handling the button clicks attempting to add a student to the manager Student added successfully handling the button clicks Student added successfully handling the button clicks attempting to add a student to the manager. 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG Student Manager: 18 adding a student to the list 38 39 40 ཅུ་ 41 42 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG PanelGui: 98 2023-03-28 20:43:09 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:43:09 [AWT-EventQueue-0] DEBUG PanelGui: 78 Student added successfully handling the button clicks about to show the students. 43 2023-03-28 20:43:09 [AWT-EventQueue-0] DEBUG StudentManager: 24 generating and returning the student output 1.1. < 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 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 <= 100 x FirstName: Sandy LastName: Beach Grade: 123.45 Add Show Grade must be <= 100 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 <= 100 2023-03-28 20:41:22 [AWT-EventQueue-0] DEBUG StudentManager:18 - adding a student to the list 2023-03-28 20:41:22 [AWT-EventQueue-0] ERROR PanelGui: 102 21 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG PanelGui:60 22 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:41:30 [AWT-EventQueue-0] DEBUG StudentManager: 2023-03-28 20:41:30 [AWT-EventQueue-0] ERROR PanelGui: 102 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG PanelGui:60 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:41:36 [AWT-EventQueue-0] DEBUG Student Manager: 2023-03-28 20:41:36 [AWT-EventQueue-0] ERROR PanelGui:102 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG StudentManager:18 - adding a student to the list 2023-03-28 20:41:46 [AWT-EventQueue-0] DEBUG PanelGui: 98 33 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG PanelGui: 86 attempting to add a student to the manager 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG StudentManager: 18 adding a student to the list. 23 24 25 26 27 28 29 30 31 32 34 35 36 2023-03-28 20:42:05 [AWT-EventQueue-0] DEBUG PanelGui: 98 37 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG PanelGui: 60 handling the button clicks attempting to add a student to the manager Student added successfully handling the button clicks Student added successfully handling the button clicks attempting to add a student to the manager. 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG PanelGui: 86 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG Student Manager: 18 adding a student to the list 38 39 40 ཅུ་ 41 42 2023-03-28 20:43:00 [AWT-EventQueue-0] DEBUG PanelGui: 98 2023-03-28 20:43:09 [AWT-EventQueue-0] DEBUG PanelGui: 60 2023-03-28 20:43:09 [AWT-EventQueue-0] DEBUG PanelGui: 78 Student added successfully handling the button clicks about to show the students. 43 2023-03-28 20:43:09 [AWT-EventQueue-0] DEBUG StudentManager: 24 generating and returning the student output 1.1. < 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Systems Analysis and Design
ISBN: 978-1305494602
11th Edition
Authors: Scott Tilley, Harry J. Rosenblatt
Posted Date:
Students also viewed these programming questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
The town of Eden Bay owns and maintains a feet of vehicles. You are a systems analyst reporting to Dawn, the town's IT manager. Background Eden Bay is a medium-sized municipality. The town has grown...
-
What is the probability that the number X of successes in the personnel managers sample of 100 employees in question 10 will be 48 or more?
-
Jim and Mary Jean are married and have two dependent children under the age of 13. Both parents are gainfully employed and earn salaries as follows: $16,000 (Jim) and $5,200 (Mary Jean). To care for...
-
A 100-turn loop antenna of radius 20 cm operating at 10 MHz in air is to give a 50 mV/m field strength at a distance 3 m from the loop. Determine (a) The current that must be fed to the antenna (b)...
-
Identify five defenses to an annulment action.
-
Gamma Systems Manufacturing Corporation has reached its maturity stage, and its net sales are expected to grow at a 6 percent compound rate for the foreseeable future. Management believes that, as a...
-
FAC3704/102 QUESTION 12 (30 marks)(36 minutes) Dexter Ltd holds 25 000 ordinary shares in Debra Ltd The shares were acquired on 1 February 20.8 for R120 000 when the retained earnings of Debra Ltd...
-
Practice: Energy Flow #2 Part 1: Use the food web on the right to answer the following questions. 1. How many food chains make up this food web? Add Text Here! 2. Which organism(s) is an autotroph?...
-
Questions 3 - 4 (Part A) uses the following data: Unique Limited has three sales divisions, High Value, Best Value, and Cut-Price Value. The Year 1 financial performance for the Best Value division...
-
A golf ball is thrown on a golf course. The target is at 1 = 18.7 m and lower than the initial point by h = 1.7 m. The golfer lifts the ball at a theta = 54 deg angle. VA Ako B x e 1. Write the 6...
-
Consider a Galois field GF(23) based on the primitive polynomial h(x) = 1 + x + x. (a) Derive the Galois field based on the given primitive polynomial in terms of binary sequences, polynomial...
-
discuss the interplay between internal and external conflicts in shaping the complexities of character motivations and actions within literary works ?
-
Calculation of Cost of Goods Bold For the Year Ended December 31, 2018 Beginning Inventory Plus: Purchases Cost of goods available for sale Less: Ending Inventory 12.200 34.000 46.200 9,400 Cost of...
-
Evaluate the improper integral or state that it is divergent. 16 dx (1+x) tan x O A. 16 In 1+ . 8|1 O C. 16 In 2 O D. 16 In , 2. O E. The integral is divergent.
-
Feller Company purchased a site for a limestone quarry for $100,000 on January 2, 2019. It estimate that the quarry will yield 400,000 tons of limestone. It estimates that its retirement obligation...
-
Search the Internet for information about groups and organizations that support and discuss object-oriented methods and issues.
-
1. Provide three sample questions to determine whether a project has technical feasibility. 2. Provide three sample questions to determine whether a project has operational feasibility. 3. Provide...
-
Many of todays projects involve team members scattered across different time zones and in different physical locations. Moreover, the projects may have adopted an agile methodology, which reduces...
-
Wagons and Wheels Ltd is a farm machinery dealership. In recent years, the company has experienced unsatisfactory profit results because of declining sales in the area. At the suggestion of the...
-
Quick Brekkie Ltd is evaluating three comparable investments. Summary data for the three investments, each of which would be paid for in current dollars, are listed below. Required Rank the three...
-
Phone Screens and Computer Screens are two divisions operated as investment centres of Siciliano Ltd. Management wants to know which of the two earned the highest return on investment for the year...
Study smarter with the SolutionInn App