Baqer M.

asked • 04/02/22

Java Programming Language

java Programming

1. Design a class named Employee_Salary that contains:

• A String data field named name representing the name of the employee.

• A String data field named position representing the position of the employee

• A double data field named salary representing the salary of the employee.

• A constructor with the parameters that initialize the name, position, and salary.

• A method named printInfo () to print the employees details (name, position, and

salary)


• Write a test program that creates an array of object to hold 5 employees object from

employee class. Assign values to the object. Calculate the salary average, then find

how many employees have a salary less than the average and how many employees

have a salary greater than the average. Calling printInfo method to display the

information of all employees and show the number of employees have a salary less

than the average and the number of employees have a salary greater than the average.


2 Answers By Expert Tutors

By:

Steven S. answered • 04/05/22

Tutor
New to Wyzant

Experienced Java Developer

Steven S.

Curious why I did something? Let's discuss.
Report

04/05/22

Jesse P. answered • 04/05/22

Tutor
4.7 (19)

Part of my Degree

Jesse P.

tutor
Let me know if you have any questions - Jesse P.
Report

04/05/22

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.