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
In a networking context, "architecture" refers to
FinnZ [79.3K]

Answer:

A well built netwrk

Explanation:

6 0
3 years ago
The true or false questions.
DIA [1.3K]

Answer:

true

Explanation:

The command:

find -empty -type f -exec rm { } \;

carries out the following steps.

1) Finds all the empty files in the current directory and its subdirectories.

2) For each of the identified files, it executes the command specified as the parameter to exec option,namely, rm <filename>.

So effectively it removes all empty files in the directory tree starting at the current directory.  

7 0
3 years ago
You have several reference computers. The computers are configured to always start from a local hard disk drive. You plan to cap
aivan3 [116]

Answer:

it is C.

Explanation:

3 0
3 years ago
Shop anywhere. Snap every receipt. Earn FREE gift cards! Sign up for Fetch with my code "DUEUY" and get 2,000 points when you sn
katovenus [111]

Answer:

mk

Explanation:

i think its DUEUY

4 0
3 years ago
Which of the following ribbon tools would be most efficient for applying multiple
pshichka [43]

Answer:

Option A, Font Dialog Box

Explanation:

In order to make changes in the text formatting, the font setting in the dialog box can be used on the Ribbon's Home tab.

From the font settings in Word 2016, one can change the following change font color, size, style etc.

Hence, option A is correct

8 0
3 years ago
Other questions:
  • Which algorithm makes the most efficient use ofmemory?
    9·1 answer
  • On the 74ls74 d flip-flop, the clk input has a small triangle. the pr (preset) and clr (clear) inputs have a circle. what do the
    15·1 answer
  • Jennifer works as a clerk in a company. The essential function of her job is typing on a keyboard. If she develops crippling art
    11·1 answer
  • The purpose of a software design is to enable programmers to implement the requirements by designating the projected parts of th
    14·1 answer
  • So i'm trying to figure out why this code wont run can anyone help me
    8·1 answer
  • Jack lost all the data he saved on his desktop because of a power outage while working on a presentation. On which of these comp
    15·2 answers
  • The type of e-cards that have an antenna built into them are __________ cards.
    10·2 answers
  • For current events, what type of sources would we use to learn about them?
    14·1 answer
  • A business letter is not written:
    6·1 answer
  • The function below takes two parameters: a string parameter: csv_string and an integer index. This string parameter will hold a
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!