1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
svp [43]
3 years ago
14

Unit 6: Lesson 2 - Coding Activity 1 AP Computer science

Computers and Technology
1 answer:
sladkih [1.3K]3 years ago
8 0

The complete program is to define a boolean method that returns true if all elements of an array are negative, or return false, if otherwise

The method in java, where comments are used to explain each line is as follows:

//This defines the method

public static boolean chkNegative (double[] myArr) {

   //This initializes a boolean variable

   boolean isNeg = true;

   //This iterates through the array

   for (int i = 0; i < myArr.length; i++) {

     //If the array element is 0 or positive

     if (myArr[i] >= 0) {

         //Then the boolean variable is set to false

       isNeg = false;

       //And the loop is exited

       break;

     }

   }

   //This returns true or false

   return isNeg;

 }

Read more about boolean methods at:

brainly.com/question/18318709

You might be interested in
Which steps will open the Access Options dialog box? Complete each statement using the drop-down menus
Novosadov [1.4K]
I believe it is Number 3
4 0
3 years ago
Read 2 more answers
Which of the following is a regional accreditation agency?
Sveta_85 [38]

Answer:

A. Middle States Association of Colleges and Schools

Explanation:

The Middle States Association of Colleges and Schools (Middle States Association or MSA) is a non-profit association that performs regional accreditation of schools both public and private  in the Mid-Atlantic region of the United States and for some institutions with an American origin. The MSA has three commissions:

  1. Middle States Commission on Higher Education (MSCHE)
  2. Middle States Commission on Elementary Schools (MSCES)
  3. Middle States Commission on Secondary Schools (MSCSS)
4 0
3 years ago
Write a program that passes an unspecified number of integers from command line and displays their total. Sample Run 1 command&g
Lana71 [14]

Using the computational language in JAVA it is possible to write a code that at least passes an unspecified number of integers

<h3>Writing code in JAVA</h3>

<em>class Exercise07_21</em>

<em>{</em>

<em>public static void main(String args[])</em>

<em>{</em>

<em>int sum=0;</em>

<em>for(int i=0;i<args.length;i++)</em>

<em>sum=sum+Integer.parseInt(args[i]);//converting string to integer and then adding it with sum variable and storing back in sum</em>

<em>System.out.println("The total is "+sum);//printing the sum</em>

<em>}</em>

<em>}</em>

See more about JAVA code at brainly.com/question/12975450

#SPJ1

5 0
2 years ago
In addition to meeting OSHA standards, the Department of Defense requires each military department, including the Department of
professor190 [17]
The correct answer is: DoD Instruction 6055.1 which is known as DoD Occupational Safety and Health Program.

<span>In addition to meeting OSHA standards, the Department of Defense requires each military department, including the Department of the Army, to administer a comprehensive safety and occupational health program. The requirement appears in this document.</span>
3 0
3 years ago
A(n) _____ access file is also known as a direct access file.
zloy xaker [14]
The answer to the question asked  above is <span>remote direct memory .

</span>A remote direct memory  access file is also known as a direct access file.

Hope my answer would be a great help for you.    If you have more questions feel free to ask here at Brainly.

5 0
3 years ago
Other questions:
  • Explain where and why metallic material or non metallic material have been used in your home​
    8·1 answer
  • From the standpoint of the governing bodies of .com, why is it important that owners of individual domains maintain authoritativ
    5·1 answer
  • 80 points two simple computer questions
    13·2 answers
  • Within a Microsoft Windows environment, who has access rights to the Encrypting File System (EFS) features and functions?
    7·1 answer
  • .Prove that f(n) = 3logn + loglogn is capital omega (logn) , what is O(n)?
    8·1 answer
  • If you type too much text on a PowerPoint slide, the additional text is added to a second slide.
    9·1 answer
  • What is the location in the base interface of the link to
    7·1 answer
  • ASAP BRAINLIEST
    13·2 answers
  • Update thejavafile names to include your initials at the end, send .java file only.1. Completein-place heapSort, which takes an
    11·1 answer
  • (10 LC)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!