Question: JAVA Write a comment on each method Write a class Employee that includes the following hidden (private) attributes: name (String), department (String) and salary (double).

JAVA

Write a comment on each method

Write a class Employee that includes the following hidden (private) attributes: name (String), department (String) and salary (double). Create a setter and a getter for each of them. The setter of salary is override by another one that gets bonus parameter (as percentage). The class includes a static and public member count (int) that represents the number of created Employee objects that incremented automatically after each created one then create a getter for it.

Crate main classes that achieve the following: a. Create an array of 10 Employee objects, created permanently, read by Scanner and read by JOptionPane, (one program for each). b. Access the objects for bonus using the formula: salary = salary * bonus (e.g. bonus = 1.2) c. Sort the objects by name and salary, (one program for each) d. Show the sorted Employee data using Command Line, JOptionPane, (one program for each). e. Access the number of objects by the count member.

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!