Question: Solve the following question in Java. Please the whole question and fulfill requirements. -method returns an array of only the positive integers -main method has

Solve the following question in Java. Please the whole question and fulfill requirements.

-method returns an array of only the positive integers

-main method has the same test as shown in python.

Solve the following question in Java. Please the whole question and fulfill

Question 6: [10 marks] Write a class named PositiveEvenFinder that implements a method named findPositiveEvens to return an int array containing all of the positive and even numbers from the provided int array, as done in this python snippet: def positive_evens( numbers Purpose: Returns all the positive even numbers in the list numbers Pre: numbers: a list of integers Post: none Return: a list of positive even integers return [x for x in numbers if x % 2 = 0 and x > 0] Use the provided main method to test your code same as this python snippet: inputs- [1,2,3,4,5] result positive_evens (inputs) result !- [2, 41: print("Testing fault: positive_evens) returned",result, "on inputs",inputs, "(didn't find the correct even numbers)")

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!