Hi,
plese help to understand this question and see if my solution right
Given that a PointXY object is even if the x-coordinate and y-coordinates are even numbers. Write a method in which it takes an array of PointXY and returns the number of even points in the array.
i have orday define PointXY class so i write as follow:
public int evenNo(int[] arr){
int d=0;
for(int i=0;i<arr.lengt h;i++)
if(arr[i]%2==0){
}
return d;}
2) Write a method that takes an array of Employees as a parameter and doubles the salary of each employee.
i have Emplyees class and in this class i do get Salary ....
please can you help to understand how to solve this question
plese help to understand this question and see if my solution right
Given that a PointXY object is even if the x-coordinate and y-coordinates are even numbers. Write a method in which it takes an array of PointXY and returns the number of even points in the array.
i have orday define PointXY class so i write as follow:
public int evenNo(int[] arr){
int d=0;
for(int i=0;i<arr.lengt h;i++)
if(arr[i]%2==0){
}
return d;}
2) Write a method that takes an array of Employees as a parameter and doubles the salary of each employee.
i have Emplyees class and in this class i do get Salary ....
please can you help to understand how to solve this question
Comment