Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

plss using Scanner Employee class - Attributes: id, name, department, age, and salary. - Default constructor (no parameters, no body) - Constructor with 5 parameters

plss using Scanner
image text in transcribed
Employee class - Attributes: id, name, department, age, and salary. - Default constructor (no parameters, no body) - Constructor with 5 parameters (id, name, department, age, and salary) - Constructor with 3 parameters (id, name, and age). Make the department fixed for all employees: Computer Science, and salary fixed to 7000 SR. - 5getter methods (for every attribute) - 5 setter methods (for every attribute) - toString 0 method to return string representation of all the attributes above. 1- In the main method (driver method): - Create an array named Employees - Create three employee objects using the constructor with 5 parameters created above. - Add the three employee objects in the array employees using for loop. - Print the details of all employees objects using toStringO and getter methods also, using for loop. - Use for loop to Increment the salary of employee objects after checking the following condition: If the employee department is Computer science, increase his/her salary by 1000Sr; otherwise no increase in salary will occur. (use the setter method for this purpose)

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

Big Data And Hadoop Fundamentals Tools And Techniques For Data Driven Success

Authors: Mayank Bhushan

2nd Edition

9355516665, 978-9355516664

More Books

Students also viewed these Databases questions

Question

3 See how comparative advantage explains the gains from trade

Answered: 1 week ago

Question

Influences on Nonverbal Communication?

Answered: 1 week ago