Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

urgent answer required Create the classes Employee. PermanentEmployee, and Temporary Employee such that the class Employee acts as the base class for the other two

image text in transcribed

urgent answer required

Create the classes "Employee". "PermanentEmployee", and "Temporary Employee" such that the class Employee acts as the base class for the other two classes, Add members & methods to the base class as specified below: The base class should contain Employee Name, EmployceID along with an abstract method called as calcNetSalary to calculate net salary, The class PermanentEmployee should contain data members for storing BasicPay. HRAPercent, DAPercent, PFPercent. Provide definition for the abstract method caleNetSalary() to calculate monthly netsalary on basis of the data given above. The class Temporary Employee should contain data members for storing Hourly Wages, Hours Worked. Provide definition for the abstract method calcNetSalary() to calculate monthly wages on basis of the data given above. Create another class called "Employee Management". In this class create 2 ArrayList to store the objects of permanent Employee and temporary Employee class. Create methods to perform the following activities: Add_Permanent Employee() - this method should receive a permanent Employee class object and insert it into first array list. Add_Temporary Employee() - this method should receive a temporary Employee class object and insert it into the second array list. Search - this method should accept an Employeel and searches for it in both of the array list. Note: initialize both the arraylist with 5 records). Create a frame window with 2 radio buttons (permanent and temporary). Permanent - In case of pressing this radio button, get the permanent employee details. Temporary - In case of pressing this radio button, get the temporary employee details, Similarly create 8 Text fields - Name, EmployceID, BPay, HRA, DA, PF. Hourly Wages and Hours Worked to accept the corresponding input values from the user. Also create 1 text area component to display the employee details. Create 7 buttons namely Add. Search. Display, MoveFirst, MovePrevious, MoveNext, and MoveLast. Add - button is used to read the information from the GUI and pass this information to the appropriate array list (based on the radio button selection). While pressing this button if any data is missing, then throw the user-defined exception "NullfieldException". Similarly, throw the user-defined exception "Human Rights ViolationException" in case if the Hours Worked > 200 hours. Search - read the employeeID and pass this to search method of Employee Managment class. If found, then display the employee details in the textarea component Display - display all the employee details in the textarea component. MoveFirst, MovePrevious, MoveNext, MoveLast buttons - perform the navigation appropriately based on the selected employee type (radio buttons) and display the same in the textarea component. Create the classes "Employee". "PermanentEmployee", and "Temporary Employee" such that the class Employee acts as the base class for the other two classes, Add members & methods to the base class as specified below: The base class should contain Employee Name, EmployceID along with an abstract method called as calcNetSalary to calculate net salary, The class PermanentEmployee should contain data members for storing BasicPay. HRAPercent, DAPercent, PFPercent. Provide definition for the abstract method caleNetSalary() to calculate monthly netsalary on basis of the data given above. The class Temporary Employee should contain data members for storing Hourly Wages, Hours Worked. Provide definition for the abstract method calcNetSalary() to calculate monthly wages on basis of the data given above. Create another class called "Employee Management". In this class create 2 ArrayList to store the objects of permanent Employee and temporary Employee class. Create methods to perform the following activities: Add_Permanent Employee() - this method should receive a permanent Employee class object and insert it into first array list. Add_Temporary Employee() - this method should receive a temporary Employee class object and insert it into the second array list. Search - this method should accept an Employeel and searches for it in both of the array list. Note: initialize both the arraylist with 5 records). Create a frame window with 2 radio buttons (permanent and temporary). Permanent - In case of pressing this radio button, get the permanent employee details. Temporary - In case of pressing this radio button, get the temporary employee details, Similarly create 8 Text fields - Name, EmployceID, BPay, HRA, DA, PF. Hourly Wages and Hours Worked to accept the corresponding input values from the user. Also create 1 text area component to display the employee details. Create 7 buttons namely Add. Search. Display, MoveFirst, MovePrevious, MoveNext, and MoveLast. Add - button is used to read the information from the GUI and pass this information to the appropriate array list (based on the radio button selection). While pressing this button if any data is missing, then throw the user-defined exception "NullfieldException". Similarly, throw the user-defined exception "Human Rights ViolationException" in case if the Hours Worked > 200 hours. Search - read the employeeID and pass this to search method of Employee Managment class. If found, then display the employee details in the textarea component Display - display all the employee details in the textarea component. MoveFirst, MovePrevious, MoveNext, MoveLast buttons - perform the navigation appropriately based on the selected employee type (radio buttons) and display the same in the textarea component

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions