Question: Assignment #7 Objectives: To write a program that implements the following Advanced Programming concepts: 1. Data encapsulation 2. Instantiate classes 3. Inheritance 4. Graphical User

Assignment #7 Objectives: To write a program that implements the following Advanced Programming concepts: 1. Data encapsulation 2. Instantiate classes 3. Inheritance 4. Graphical User Interface concepts Assignment #7: Add Employee Section 7.1 The program will have a class called Employee, the following private attributes: 1. ID 2. Social security number (ssn) 3. salutation (Mr., Mrs, Ms.) 4. first name 5. last name 6. maiden name 7. earning type (1 salaried, 2 hourly) 8. earning (hour pay) Section 7.2 Using the above class make the following frame class (EmployeeFrame): Figure 1. Add Employee Frame 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. Section 6.3 Earning Types: Your GUI will have two types of earnings, when you select: Hourly the GUI will show all the components shows in section 6.2. Salaried the GUI will change label Hour Pay: to Salary:, and will hide the rest of the components. Your project will have at least 3 classes: Employee class with attributes of section 7.1. EmployeeFrame class with the GUI of section 7.2. EmployeeDriver class who call EmployeeFrame. Your program should implement any exception handling that been required.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!