Question: Given the employee class (below), create 7-8 employee objects and store in ArrayList. The answer the following queries: class Employee String firstName; String lastName;

Given the employee class (below), create 7-8 employee objects and store in 

Given the employee class (below), create 7-8 employee objects and store in ArrayList. The answer the following queries: class Employee String firstName; String lastName; int age; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName (String lastName) { this.lastName = lastName; } public int getAge() { return age; } public void setAge(int age) { this.age = age; Find all the employees whose age is between 30 and 40 and print only the last names Count number of employees whose age is greater than 40 Find the maximum and minimum age of the Employee

Step by Step Solution

3.36 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem in Java we first need to create the Employee class properly with its attributes and methods After that we will instantiate sever... View full answer

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 Programming Questions!