Question
Please solve this without using array list output should be same as sample output Create a class named Employee with a method information . Then
Please solve this without using array list output should be same as sample output
Create a class named Employee with a method information . Then take the input of n number of Employees name, Job Id, Salary, phone number, address, Designation from user and Store information in a text file named EmployeeInformation.
Now create another class named EmployeeData with a method Data which will Retrieve Employee Information from the text file , Store in a array and pass it to the hSalary method as a parameter. Create another abstract method lSalary in this class.
Now create a class named HighestSalary with a method hSalary which will calculate the highest salary using employee Data. Write the information (name, Job id, salary, phone number, address, designation) of that person in another text file named highest.
Now create another Class LowestSalary which will extends EmplyoeeData Class.Now calculate lowest salary . Write the information (name, Job id, salary, phone number, address, designation) of that person in another text file named lowest.
Create a interface named Salary with methods allData, lowest,highest,average.
Create another Class Named Display which will implement Salary interface. Retrieve lowest and highest salary from the text file and calculate average of the salary.Print lowest with person details ,highest with person details , average and all employee information .
Note: lowest method will retrieve lowest ,highest will retrieve highest and allData will retrieve employeeInformation
Now create a class Main with a main method which will use to create objects and call methods.
Sample output: Enter How many Employee Information? 3 Enter 1st employee details? Name: Id: Salary: Phone: Address: Designation: Enter 2nd employee details? Name: Id: Salary: Phone: Address: Designation: Enter 3rd employee details?: Name: Id: Salary: Phone: Address: Designation: All Employee Information stored successfully Highest Salary information stored successfully Lowest Salary information stored successfully. Lowest Salary: Name Id SalaryPhone Address Designation 018777887 Dhaka 1200 Manager Rahim2 123 Highest Salary: Name Id Rahim 124 SalaryPhone Address 1300018777887 Dhaka Designation Manager Average: 1250 All Employee: Name Id SalaryPhone Address Designation Rahim 124 Rahim2 123 Rahim3 122 1300018777887 Dhaka 1200018777887 Dhaka 1225018777887 Dhaka Manager Manager Manager
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started