Question: can someone please help me with this coding activity? the last slide is what isn't working. Instructions In the U6_L2 Activity One class, write a

can someone please help me with this coding activity? the last slide is what isn't working.
can someone please help me with this coding activity? the last slide
is what isn't working. Instructions In the U6_L2 Activity One class, write
a public static method called alleen ive which has a single parameter
of an array of ownie does The method should return a boolean

Instructions In the U6_L2 Activity One class, write a public static method called alleen ive which has a single parameter of an array of ownie does The method should return a boolean which is true if the parameter array contains only negative values and false otherwise. Use the runner class to test this method do not add a main method to your code in the U6 L2 Activity One.java file or it will not be scored correctly Sample runs (runner class Enter array length Enter volues -2.0 -1.5 -0.3 -2.2 -8.1 All negative: true Enter array length: Enter volues: -1.0 -10.5 0.0 -0.2 All negative: false If you'd like a hint to get started, watch the video below: lo . Te Files Files SAVE U6_L2_Activity_One.java 1. public class 06_12 Activity One 2 3 // Write your allNegotive method here 4 public static boolean al Negative (double arri) 5- arra 6 7 3 runner_06_L2_Activity SONO in the U5.12. ActivityOne method cated allegative, which trang parameter of any of double The method should return a boolean parameter way contains only tegevus tale otherwise. Use the runner teeth method do not add a main method to the U6 12. Activity. One for scored correctly 9) 10 es STATUS @ =_L2 Activity_One.java RUN CODE CLEAR mner_06_L2_Activity O NOT SUBMITTED SAVE SUBMIT 1. import java.util.Scanner; 2- public class runner_06_12_Activity One I 3- public static void main(String args) { 4 Scanner scan - new Scanner(System.in); System.out.println("Enter array length: "); 6 int len- scan.nextInto: double vals - new double[len]; System.out.println("Enter values:"); 9- for(int i = 0; i = 0) return false; { } } return true; 9} 10 11 12 13 14

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!