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
Troyanec [42]
3 years ago
15

Assume that the following method header is for a method in class A.

Computers and Technology
1 answer:
fenix001 [56]3 years ago
8 0

Answer:

The answer to the given question is option "B".

Explanation:

In the question it is given that there is a method name is "displayValue()" is defined in this method we pass an integer variable that is "value" and in this method, we calculate some values, and call this method So, the correct code for calling this method is the option "B" and others options are not correct that can be described as:

  • In option, A Calling time of the function we do not use the return type, That's why this option is not correct.
  • In option, C Calling time of the function we do not pass any data type of variable, That's why this option is not correct.
  • In option, D we do not use semicolon in the function call, which is wrong.

That's why option "B" is correct.

You might be interested in
Identify the false statement.
Colt1911 [192]

Answer:

a. When you perform arithmetic operations with operands of unlike types, you must make an explicit conversion to a unifying type.

Explanation:

The above written statement is false because when we perform arithmetic operations with operands of unlike types we don't need to an explicit conversion because the compiler does that.The compiler automatically applies the suitable conversion conversion of data types resulting in reduction in our work.

4 0
3 years ago
The force required to slide an object is equal to _____.
solmaris [256]

<em>Answer:</em>

<em>The force required to slide an object is equal to </em><em><u>Friction .</u></em><em>weight  normal force  friction  µk.</em>

<em></em>

<em />

5 0
3 years ago
Davingould1115...................answer 3​
FrozenT [24]

Answer:

yo thx bro let me know if u need any more help

Explanation:

4 0
3 years ago
Write a program in C which will open a text file named Story.txt. You can create the file using any text editor like notepad etc
ddd [48]

Answer:

See explaination

Explanation:

#include <stdio.h>

#include <stdlib.h>

int main()

{

FILE * file_object;

char file_name[100];

char ch;

int characters=0, words=0;

printf("Enter source file name: ");

scanf("%s", file_name); //asking user to enter the file name

file_object = fopen(file_name, "r"); //open file in read mode

if (file_object == NULL)

{

printf("\nUnable to open file.file not exist\n"); //check if the file is present or not

}

while ((ch = fgetc(file_object)) != EOF) //read each character till the end of the file

{

if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\0') //if character is space or tab or new line or null character increment word count

words++;

else

characters++; //else increment character count this assures that there is no spaces count

}

printf("The file story.txt has the following Statistics:\n"); //finally print the final statistics

if (characters > 0)

{

printf("Words: %d\n", words+1); //for last word purpose just increment the count of words

printf("Characters (no spaces): %d\n", characters);

}

fclose(file_object); //close the file object

return 0;

}

6 0
4 years ago
loop Write a program to read a list of exam scores given as integer percentages in the range 0 to 100. Display the total number
Licemer1 [7]

Answer:

import java.util.Scanner;

public class Program

{

public static void main(String [] Args)

{

int A_grades = 0;

int B_grades = 0;

int C_grades = 0;

int D_grades = 0;

int F_grades = 0;

int count=0;

int max = 0;

int min = 9999999;

int num;

int total = 0;

int smallest = 0;

int largest = 0;

Scanner in = new Scanner(System.in);

System.out.println("Enter exam score as integer percentage in range 0 to 100");

System.out.println("And enter a negative score at the end of the list :");

int score = in.nextInt();

while(score>0)

{

count++;

if(score < 0){ // negative number

break;} // exit the infine loop

else if(score > max){ // find bigger one

max = score;}

else if(score < min) { // find smallest one

min = score;}

total = total + score; // the total for average

if(score <= 50 && score>0)

smallest = score;

if(score > 90 && score <=100)

largest = score;

if(score>=90 && score<=100)

A_grades++;

else if(score>=80 && score<=89)

B_grades++;

else if(score>=70 && score<=79)

C_grades++;

else if(score>=60 && score<=69)

D_grades++;

else if(score>=0 && score<=59)

F_grades++;

score = in.nextInt();

} //end while

System.out.println("Total number of scores is : " + count );

System.out.println("Total Number of each Letter grade : " + count);

System.out.println("Percentage of total for each letter grade : ");

System.out.println("Total number of A grades :"+ A_grades);

System.out.println("Total number of B grades :"+ B_grades);

System.out.println("Total number of C grades :"+ C_grades);

System.out.println("Total number of D grades :"+ D_grades);

System.out.println("Total number of F grades :"+ F_grades);

System.out.println("Lowest Score is :"+smallest);

System.out.println("Highest Score is :"+largest);

System.out.println("Average score : "+ (total / count));

}

}

Explanation:

The Java program is such that functions in this manner, It reads a list of exam scores given as integer percentages in the range 0 to 100. Displays the total number of grades and the number of grades in each letter-grade category as follows: 90 to 100 is a A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F.

See attachment for program output.

8 0
3 years ago
Other questions:
  • You need to set up a network that needs to span multibple buildings. For this reason, you want to use the cabling that supports
    10·1 answer
  • Predictive coding software leverages .............................when experts review a subset of documents to teach the softwar
    15·1 answer
  • ________________ is a new method or idea or product or enhancement or other means of adding value to an existing product, such t
    14·1 answer
  • Pierre received an urgent email appearing to come from his boss asking him to respond quickly to the email with the company cred
    10·1 answer
  • What should be included in research for a problem statement? Select all that apply
    13·2 answers
  • What should the timing of transition slides be per minute?
    12·1 answer
  • You need to secure your wireless network. which security protocol would be the best choice
    10·1 answer
  • What device connects a lan's switch to the next network? qizzlets?
    5·1 answer
  • In a _______ format, the date line and the signature block are centered.
    6·1 answer
  • A software engineering process (SEP), also known as a software development process, defines the ______ of developing software.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!