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
What types of information are commonly included in headers and footers? Check all that apply.
polet [3.4K]
Date
Page number
File path and file name
3 0
3 years ago
On a DTP project, Morgan is preparing digital files to be sent to a printer. Which word describes the activity that Morgan is pe
VladimirAG [237]

In this activity Morgan is preparing the digital files to a printer  on a DTP project.

Explanation:

DTP project is the creation of documents using page layout on a personal computer. The process of printing digital based images directly to variety of media substrates is known as digital processing.

The digital files like PDFs can be sent directly to digital printing press to print on paper, photo paper, fabric and so on.

They have unique fade rates and different sensitives to the various deterioration mechanisms. DTP is used for graphic designers to create documents.

6 0
3 years ago
Read 2 more answers
What are html documents also called?
11Alexandr11 [23.1K]
HyperText Markup Language
4 0
3 years ago
Me Completan Pliiiis
Brut [27]
Can you translate please i’ll help better
4 0
3 years ago
How do you fix peer answer bad gateway 502. Please help
kondaur [170]

Answer:

Reload the page.

Look for server connectivity issues.

Check for any DNS changes.

Sift through your logs.

Fix faulty firewall configurations.

Comb through your website's code to find bugs.

Contact your host.

Explanation:

7 0
3 years ago
Other questions:
  • About ___% of children score within one standard deviation above or below the national average in intelligence.
    5·1 answer
  • Why is color theory important
    6·2 answers
  • In class, we discussed static local variables in C. Answereach question below; if necessary, find and consult a reference on the
    10·1 answer
  • Which ergonomic principle helps to maintain good posture?
    8·2 answers
  • What is contrast (in Photography)?
    14·1 answer
  • This project involves writing a program that encodes and decodes messages. The program should prompt the user to select whether
    15·1 answer
  • Which expression is equivalent to 3x + 3x + 3x?<br><br> From Performance Matters
    11·2 answers
  • Edhesive unit 4 test answers
    15·1 answer
  • The physical layer of the OSI model is not foundational to any of the other layers. True or False
    8·1 answer
  • Find the unknown quantities
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!