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
Svetradugi [14.3K]
3 years ago
13

Public class Square extends Shape{

Computers and Technology
1 answer:
olga nikolaevna [1]3 years ago
4 0

Answer:

I would say A

Explanation:

Enjoy :)

You might be interested in
DRIVER ED
julsineya [31]

This is true. Motorcycles are much smaller than cars and therefore more easily can slip into a blind spot. Motorcyclists also have less protection than other drivers and would likely suffer more injury in a collision.

4 0
4 years ago
Read 2 more answers
For a set of integers stored in an array,calculate the sum of the positive numbers and the sum of the negative numbers. The prog
Radda [10]

Answer: The c++ program to implement the given conditions is shown below.

#include <iostream>

using namespace std;

int main()

{

// used as index of array in the loop for calculating the sum

   int i=0;

// array contains both negative and positive integers

// 0 is used as the sentinel value

   int arr[12]={-9,-8,-3,-12,-78,-10,23,45,67,1,0};

   int positiveSum=0, negativeSum=0;

   do

   {

       if(arr[i]<0)

           negativeSum = negativeSum + arr[i];

       if(arr[i]>0)

           positiveSum = positiveSum  + arr[i];

// after every element is added, index of array represented by i is incremented

       i++;

   }while(arr[i]!=0);

// loop continues till end of array is reached

   cout<<"Sum of positive integers "<<positiveSum<<" and sum of negative integers "<<negativeSum<<endl;

   return 0;

}

OUTPUT

Sum of positive integers 136 and sum of negative integers -120

Explanation: This program declares and initializes an integer array without user input. As mentioned in the question, 0 is taken as the sentinel value which shows the end of data in the array.

   int arr[12]={-9,-8,-3,-12,-78,-10,23,45,67,1,0};

All the variables are declared with data type int, not float. Since, integers can yield integer result only.

The do-while loop is used to calculate the sum of both positive and negative integers using int variable i. The variable i is initialized to 0.

This loop will run till it encounters the sentinel value 0 as shown.

while(arr[i]!=0);

Hence, all the integers in the array are read one at a time and sum is calculated irrespective of the element is positive or negative.

       if(arr[i]<0)

           negativeSum = negativeSum + arr[i];

       if(arr[i]>0)

           positiveSum = positiveSum  + arr[i];

After the element is added, variable i is incremented and loop is continued.

The do-while loop tests positive and negative integers based on the fact whether their value is greater than or less than 0.

The program can be tested using different size and different values of positive and negative integers in the array.

7 0
4 years ago
In a single statement: declare, create and initialize an array named a of ten elements of type int with the values of the elemen
Verizon [17]

Answer:

int[] a = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};

Explanation:

//written in java

The left side <u>int[] a</u> Declare a variable(a) which is of type Integer array(<u>int[]</u>).

The equal sign(=) assign the right side to the left side.

The right side initialize the integer array(a) with ten element.

6 0
3 years ago
Which of the following explains why computers can be used in accounts payable? Computers can use random steps to identify the du
Sphinxa [80]

Answer:

Its A buddy

Explanation:

that what it was on ingenuity

4 0
3 years ago
Read 2 more answers
Anyone wanna hop on 1v1.lol<br> party code : usfhb6
hjlf

Answer:

thx for the points

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • According to your textbook, the three major criteria against which to test documents that you locate on the Internet are authors
    8·1 answer
  • What is TCP/IP's Transport layer's primary duty?
    8·1 answer
  • An enterprise DBMS is automatically capable of serving as a mobile DBMS. There are no special issues raised by mobility. True Fa
    11·1 answer
  • What type of computer system can be found in the computer lab at school?
    14·1 answer
  • PLEASE HELP!
    5·1 answer
  • Ayudaaaaa, Instale el software equivocado a mi tv westinghause con placa tp.Ms338.Pb801 y ahora queda en negro, ¿Cómo lo puedo s
    15·1 answer
  • Websites not only give us information, but they also inspire designers in their layouts, illustrations, images, typefaces, and c
    6·1 answer
  • What is the name of tool
    11·1 answer
  • Plz help
    10·1 answer
  • What does playstation network is currently undergoing maintenance?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!