Question: In java. Write a program that implements the following concepts: Data encapsulation, Instantiate classes, Inheritance and Graphical User Interface concepts The program will have a
In java. Write a program that implements the following concepts: Data encapsulation, Instantiate classes, Inheritance and Graphical User Interface concepts
The program will have a class called Employee, the following private attributes: . ID, Social security number (ssn), salutation (Mr., Mrs, Ms.), first name, last name, maiden name, earning type (1 salaried, 2 hourly), earning (hour pay)
Using the above class make the following frame class (EmployeeFrame):

When the user filled the Hour Pay field after losing focus you must calculate Week payment and Year payment. Week payment and Year payment fields should be disable. The Add button will instantiate class Employee populating all attributes with the text of the components of your GUI then print all the fields into the console using method toString() of the Employee class, like: Employee: id=1234, salutation=Darth, firstName=Vader, lastName=Skywaker, maidenName=Unknown, ssn=123-10-2045, earning_type=1, earnings=30.0 The Cancel button will close the frame.
Earning Types: Your GUI will have two types of earnings, when you select: Hourly the GUI will show all the components shows in section and when you select Salaried the GUI will change label Hour Pay: to Salary:, and will hide the rest of the components. The program musthave at least 3 classes:
Employee class with attributes
EmployeeFrame class with the GUI
. EmployeeDriver class who call EmployeeFrame.
Your program should implement any exception handling that been required.
Add Emplayee Blue panel Salutaon: employee photo 123-10-2045 first nama: ad Lest Rame: awa Mother's Lan Name Unnown employee earning type Salaried Hour Pay 120000_ (earning x 40.0hrs) Hourty Year Pagmonc S62 400 00(week earning x 52 weeks] Figure I. Add Employee Frame Add Emplayee Blue panel Salutaon: employee photo 123-10-2045 first nama: ad Lest Rame: awa Mother's Lan Name Unnown employee earning type Salaried Hour Pay 120000_ (earning x 40.0hrs) Hourty Year Pagmonc S62 400 00(week earning x 52 weeks] Figure I. Add Employee Frame
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
