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
OverLord2011 [107]
3 years ago
10

Is the following statement a valid parameter declaration? please explain!! i need a lot of help! thank you!

Computers and Technology
1 answer:
Gelneren [198K]3 years ago
6 0

Answer:

NO

Explanation:

The parameter is declared in the function definition which takes the value from the calling function.

In the define function, we also declare the parameters with it type like int, char, float or double, etc.

Let's discuss the given function:

public void baseball (int batting average, hits,homeruns)

In the function, three variables are shown.

1. int batting average: Here, the variable type (int) is declared but the variable is not valid because the programming variable must NOT contain any space.

here, space exists between batting and average which is wrong.

2. hits: here, the variable type is not declared. this parameter is also not correct to declare.

3. homeruns: the variable type is not declared. this parameter is also not correct to declare.

Therefore, the statement has no valid parameter declaration.

You might be interested in
Are the ways data is represented and transmitted with computers laws of nature or laws of man?
puteri [66]
I believe the correct answer is Laws of Man
4 0
3 years ago
When developing an estimate, which of the following items is typically marked up with the highest percentage rate?
dmitriy555 [2]

Answer: D. Labor

Explanation:

8 0
2 years ago
A mobile device user has tried to install a new app numerous times without success. She has closed all unused apps, disabled liv
elena-14-01-66 [18.8K]

The correct answer is B. Check for sufficient available storage space.  

Explanation:

One of the factors that can cause it is not possible to install a new app is insufficient storage as space in the mobile device is needed to save the app. This can be easily solved either by deleting apps and other content or expanding the memory available through a Micro SD card. Also, before attempting any major procedure such as a complete reset it is important to check the storage space availability. In this context, the user should check for sufficient available storage space (option B) because this might be the cause of the issue she is experiencing; also, this is a basic step before considering others such as performing a factory reset.

6 0
3 years ago
Many web browsers include _________ tools to make it easier for designers to locate the source of a style that has been applied
nordsb [41]

Answer:

c. developer

Explanation:

DEVELOPER TOOLS are tools that enables designers to easily and quickly edit web page and as well diagnosed issues or problem on a website which will inturn enables them to build a great and better websites without stress reason been that when a designer makes use of DEVELOPER TOOLS they can quicky track down and as well fix the problem that was diagnosed within a minute or seconds thereby saving time when developing a website profile.

8 0
3 years ago
In this problem, there will be the construction of a program that reads in a sequence of integers from standard input until 0 is
Sedaia [141]

Answer:

Check the explanation

Explanation:

package util;

import java.util.ArrayList;

import java.util.Iterator;

import java.util.List;

import java.util.Scanner;

public class Assignment9 {

public Assignment9() {

List<Integer> numList = new ArrayList<Integer>();

Scanner sc = new Scanner(System.in);

System.out.println("Please enter the numbers , press 0 to stop");

int x = 0;

do {

x = sc.nextInt();

numList.add(x);

} while (x != 0);

int size = numList.size();

Integer[] numArray = new Integer[size];

Iterator<Integer> it = numList.iterator();

int i = 0;

while (it.hasNext()) {

numArray[i] = it.next();

i++;

}

int min = findMin(numArray, 0, 2);

System.out.println("The minimum number is " + min);

int sum = computeNegativeSum(numArray, 0, 2);

System.out.println("The sum of the negative numbers is " + sum);

int sumOdd = computeSumAtOdd(numArray, 0, 3);

System.out

.println("The sum of the numbers at odd indexes is " + sumOdd);

int countEven = computeCountEven(numArray, 0, 3);

System.out.println("The total count of even integers is " + countEven);

}

/**

* This method is used to compute the minimum number

* "at"param NumArray

* "at"param startIndex

* "at"param endIndex

* "at"return

*/

public int findMin(Integer[] NumArray, int startIndex, int endIndex) {

if (startIndex == endIndex)// base case50.

{

return NumArray[startIndex]; // return value is there is only one

// entry

} else if (findMin(NumArray, startIndex, endIndex - 1) < NumArray[endIndex]) {

return findMin(NumArray, startIndex, endIndex - 1);

} else {

return NumArray[endIndex];

}

}

/**

* This method is used to find the sum of negative numbers in the array

* "at"param NumArray

* "at"param startIndex

* "at"param endIndex

* "at"return

*/

public int computeNegativeSum(Integer[] NumArray, int startIndex,

int endIndex) {

if (startIndex == endIndex) {

if (NumArray[startIndex] > 0) {

return 0;

} else {

return NumArray[startIndex];

}

} else if (NumArray[endIndex] < 0) {

return computeNegativeSum(NumArray, startIndex, endIndex - 1)

+ NumArray[endIndex];

} else {

return computeNegativeSum(NumArray, startIndex, endIndex - 1); // if

}

}

/**

* This method is used to find the sum of numbers at odd indexes (1,3, 5,...),

*

* "at"param NumArray

* "at"param startIndex

* "at"param endIndex

* "at"return

*/

public int computeSumAtOdd(Integer[] NumArray, int startIndex, int endIndex) {

if (startIndex == endIndex) {

if (startIndex % 2 == 1) {

return NumArray[startIndex];

} else {

return 0;

}

} else {

if (endIndex % 2 == 1) {

return computeSumAtOdd(NumArray, startIndex, endIndex - 1)

+ NumArray[endIndex];

} else {

return computeSumAtOdd(NumArray, startIndex, endIndex - 1);

}

}

}

/**

* This method is used to find the number of even numbers within the array

*

* "at"param NumArray

* "at"param startIndex

* "at"param endIndex

* "at"return

*/

public int computeCountEven(Integer[] NumArray, int startIndex, int endIndex) {

if (startIndex == endIndex) {

if (NumArray[startIndex] % 2 == 0) {

return NumArray[startIndex];

} else {

return 0;

}

} else if (NumArray[endIndex] % 2 == 0) {

return computeCountEven(NumArray, startIndex, endIndex - 1)

+ NumArray[endIndex];

} else {

return computeCountEven(NumArray, startIndex, endIndex - 1); // if

}

}

public static void main(String args[]) {

Assignment9 assignment9 = new Assignment9();

}

}

Sample Output is :

*************************

Please enter the numbers , press 0 to stop

5

7

3

2

4

-7

-3

0

The minimum number is 3

The sum of the negative numbers is 0

The sum of the numbers at odd indexes is 9

The total count of even integers is 2

8 0
3 years ago
Other questions:
  • What characteristics need to be exhibited by an organisation to improve its software process?
    7·1 answer
  • In excel, a cell is referred to by its cell __________, which is the coordinates of the intersection of a column and a row. answ
    14·1 answer
  • The cmos memory located on the motherboard is often referred to as _____ memory because of its capability to store bios settings
    9·1 answer
  • A computer’s BIOS is defined as the
    12·2 answers
  • How has information technology made piracy possible
    14·1 answer
  • PLZ HELP WITH SPEED i need the answer<br><br> WILL GIVE BRAINLIEST
    15·1 answer
  • Write a program to compute the sum of digits in a number given by the user. You must use your own function to compute the sum of
    6·1 answer
  • Moving your Sprite top to bottom is moving along the X coordinate?<br><br> True<br> False
    5·2 answers
  • What was the in-app phrase listed as SC answer? <br> A) MasterCard <br> B) No fee<br> C) Apple Pay
    15·2 answers
  • How to generate random numbers in excel without duplicates
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!