Question: Task Solution Java SE 8 1 you can also use imports, for example: 2 I import java.util.* A newly created medical test, the purpose of

 Task Solution Java SE 8 1 you can also use imports,

Task Solution Java SE 8 1 you can also use imports, for example: 2 I import java.util.* A newly created medical test, the purpose of which is to diagnose a rare disease, has been tested on a group of N patients. For each patient, the test may be either positive or negative, but the result might not always be correct (e.g. a person with a positive test result may in fact not be ill). Having information about the real state of health of each patient, which we call the 'predicted test result, we want to calculate the quality of the new test, that is, its sensitivity and specificity 4 /I you can write to stdout for debugging purposes, e.g 5 // System.out.println("this is a debug message"); 7 class Solution 1 8 public double solution(int[] A, int[] B, boolean q) f // write your code in Java SE 8 10 Write a function class Solution f public double solution(int[] A, int[] B, boolean q)i ) that, given two arrays of binary values A and B, both of length N, representing the actual and predicted results of a test, where 0 represents a negative result and 1 a positive one, returns either sensitivity of the test (when q is false) or specificity of the test (when q is true) Test Output Example test cases A [1,0, 1,1,0, 1], B- [0, 1,1,0, 0, 1], q false

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!