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
Why is it important to explore an Integrated
dezoksy [38]

Answer:

The answer to this question is given below in the explanation section. The correct answer is B.

Explanation:

The purpose behind to explore an integrated development environment is to learn more about the features of the environment.

So the correct answer is B.

For example, you can use visual studio to build asp.net application using c#, then you need to explore what features visual studio offering to you.

However, other options are incorrect. Because, you can learn more about syntax, error handling, and abstraction in the programming language, not in the IDE.

6 0
3 years ago
Computer World sells laptops separately from accessory products like docking stations, anti-virus software, and external hard dr
uysha [10]

Answer:

Optional product pricing

Explanation:

<em>Optional product pricing</em> occurs when a product is sold for a much lower price but complementary products or accessories are sold separately to generate profit.

A typical example is in the printer category, printer cartridges are sold separately from the printer when the one in the newly purchased printer runs out. The customer is forced to purchase new cartridges that the company benefits from as profits.

Optional product pricing is a strategy to provide less expensive technology while exploiting the frequent use of accessories to make a substantial profit.

6 0
3 years ago
In networking, bandwidth is the volume of computer data carried via a conductor in a period of time. Which one of these could be
masya89 [10]

Answer:

The answer is "Fiber Optic Cable".

Explanation:

In the given question options are defined, but in these options, there is some error.

The optical fiber cable is also known as internet wiring, which includes fiber strands inside an isolated housing. It is used to transferring data at a very high speed. This cable is developed for long-range data networking, high-performance connectivity, and multimedia, and other choices are wrong that can be described as follows:

  • A modem is used to transmits data over a network, that's why it is wrong.
  • Router is used to transport traffic between your computer and the internet, that's why it is wrong.
7 0
3 years ago
What task do the referential integrity settings prevent?
Cerrena [4.2K]

Answer:

D

Explanation:

5 0
3 years ago
Read 2 more answers
What type of USB connector is always plugged into the computer to connect in external device
barxatty [35]
HDMI? I am not entirely sure
4 0
3 years ago
Other questions:
  • PLS HURRY!! This OS introduced a very cool GUI that had animations and transparencies.
    5·1 answer
  • What are the benefits of using a multiview sketch?
    11·1 answer
  • How to block someone from watching your youtube videos?
    12·2 answers
  • This needs to be written in Java.
    11·1 answer
  • What kind of value should an employee possess when employees are expected to be responsible and fair?
    7·1 answer
  • Why is it important to brain storm and develop concepts prior to selecting an idea that you wish to move forward with as a solut
    7·1 answer
  • Using the employment websites, search for part-time jobs that relate to the career fields you are interested in pursuing or to y
    12·2 answers
  • 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
  • I still haven't figured out how to award someone branliest will someone help me? If you explain to me how to do it i will do awa
    14·1 answer
  • This isn't an academic question, but can anyone help me change the face on my apple watch to a picture from my camera roll? I've
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!