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
Two friends can share 100 songs from their Bluetooth enabled mobile devices
Umnica [9.8K]

Answer:

A

Explanation:

If they are connected via bluetooth, you can share unlimited amounts of anything.

6 0
3 years ago
Ali rolled a ball down a hill. This graph shows the kinetic and potential energy of the moving ball.
denis23 [38]
Ghhsususuhwbababahaha
8 0
2 years ago
Seven Features of computer aids design software
astra-53 [7]
Computer-aided engineering (CAE) and finite element analysis (FEA) Computer-aided manufacturing (CAM) including instructions to computer numerical control (CNC) machines. Photorealistic rendering and motion simulation. Document management and revision control using product data management (PDM).
3 0
3 years ago
The creation of​ __________ with digital media allows for large quantities of numerical or textual data to be searched online by
ANEK [815]

Answer:

Option A- Reference materials

Explanation:

Reference Materials A digital reference library that provides more than 600 high-quality reference books from the world's leading publishers to be searched online by data points and trends

3 0
3 years ago
Read 2 more answers
Find the number of ideal integers within the given segment [low,high] inclusive. An ideal number is a positive integer that has
Alex Ar [27]

Answer:

  1. low = 10
  2. high = 50
  3. count = 0
  4. for i in range(low, high + 1):
  5.    if(i % 3 == 0 and i % 5 == 0):
  6.        count += 1
  7. print(count)

Explanation:

The solution code is written in Python.

We can create low and high variables to store the lower bound and upper bound in the range (Line 1-2)

Next create a counter variable, count (Line 3).

Use a for loop to traverse through the number between lower bound and upper bound and check if the current number-i is divisible by 3 and by 5, increment the count by one.

After the loop, print the count and we can get the number of ideal integers within the range (Line 8).

6 0
3 years ago
Other questions:
  • Local television news networks cover only
    8·2 answers
  • True or false: although the first personal computers were available as early as the 1970's, the creation of the world wide web (
    11·1 answer
  • You are in charge of five software development projects. The project characteristics of each of the sys are as follows:
    13·1 answer
  • Drag each label to the correct image.
    9·2 answers
  • What are some options available in the Spelling and Grammar Checker? Check all that apply. Change and Change All Redo and Repeat
    15·2 answers
  • Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Display the triangle by writing li
    14·1 answer
  • How do cyber criminals target user’s end devices?
    11·2 answers
  • Which of these are characteristics of a Python data type? Check all that apply.
    11·1 answer
  • Please help I need help with web technology I forgot to post the question in the last one. here it is tho.
    9·1 answer
  • Could anyone please answer this?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!