Question: I want to solve this question using a scanner without using arrays plss using Scanner 1- Create a java program to do the following: Employee

I want to solve this question using a scanner without using arrays I want to solve this question using a scanner without using arrays

plss using Scanner 1- Create a java program to do the following: 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. - Sgetter methods (for every attribute) - 5 setter methods (for every attribute) - toString0 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 toStringi) 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 1000 Sr; 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

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!