Reference no: EM1344808
Q1) You are required to complete the following questions as per the requirement provided by the questions. Write a Java application which meets the following requirements:
a) In the application, you should declare a class called "Employee" with the following details:
Variable Name Description of variable
EmpNo Employee No
EName Employee Name
EDesig EmployeeDesignation
BSal BasicSalary
HA HouseAllowance
Member Functions Description for Member Functions
getValues() Should initialize the values for the member variables EmpNo, ENname, EDesig, BSal, HA .
CalculateSalary() Should calculate the Gross salary as the sum of the BSal and HA
DisplayValues() Should print the value of the instance variables along with Gross salary.
b) In your main method, create N number of Employee objects, where the value of N is obtained from the user and store the objects into an array.
c) Use appropriate methods to read the values of the Employee objects from user, Calculate the Gross Salary for each Employee and print employee details and salary details of all objects created.
d) Use exception handling appropriately.
e) Use comments to illustrate the various concepts applied / utilized in the solution.
f) Ensure the use of meaningful variable names, consistent indentation of program code