Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

=+ Why have these changes occurred?

Answered: 1 week ago

Question

=+90 percent of all oil refineries) into several smaller companies

Answered: 1 week ago