Write a JAVA program which performs the following listed operations:
A.
Create a package named MyEmpPackage which consists of following classes
A class named Employee which stores information like the Emp number, first name, middle name, last name, address, designation and salary. The class should also contain appropriate get and set methods.
05
A class named AddEmployeeFrame which displays a frame consisting of appropriate controls to enter the details of a Employee and store these details in the Employee class object. The frame should also have three buttons with the caption as “Add Record” and “Delete Record” and “Exit”.
10
A class named MyCustomListener which should work as a user – defined event listener to handle required events as mentioned in following points.
05
B
When the “Add Record” button is clicked, the dialog box should be appeared with asking the user “Do you really want to add record in the file”. If the user selects Yes than the record should be saved in the file.
10
When the “Exit” button is clicked, the frame should be closed.
10
[Note: Use the MyCustomListener class only to handle the appropriate events]
C
The “Delete Record” button should open a new frame which should take input of delete criteria using a radio button. The radio button should provide facility to delete on basis of first name, middle name or last name.
10
The new frame should also have a text box to input the delete criteria value.
10
The record should be deleted from the file and a message dialog should appear with the message that “Record is successfully Deleted”.
10
[Note: Use the MyCustomListener class only to handle the appropriate events]
D
Provide proper error messages and perform appropriate exceptions where ever required in all the classes
10