Create class Associate with below attributes:
id - int
name - String
technology - String
experienceInYears - int
Create class Solution and implement static method
"associatesForGivenTechnology" in the Solution class.
This method will take array of Associate objects and a searchTechnology
String as parameters.
And will return another array of Associate objects where the
searchTechnology String matches with the original array of Associate
object's technology attribute (case insensitive search) and
experienceInYears attribute should be multiples of 5.
Write necessary getters and setters.
Before calling "associatesForGivenTechnology" method in the main
method, read values for five associate objects referring the attributes
in above sequence along with a String searchTechnology.
Then call the "associatesForGivenTechnology" method and write the logic
to print the id's in the main method.
Comments
Post a Comment