Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

help mee
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 7000SR. - 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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions