subject
Computers and Technology, 12.11.2019 19:31 Sidm29

Write the definition of a method printattitude, which has an int parameter and returns nothing. the method prints a message to standard output depending on the value of its parameter. if the parameter equals 1, the method prints disagree if the parameter equals 2, the method prints no opinion if the parameter equals 3, the method prints agree in the case of other values, the method does nothing. each message is printed on a line by itself.

here is what i have so far that is being marked incorrect:

public static void printattitude (int x)

{

if (x==1){

system. out. println("disagree");

}

if (x==2){

system. out. println("no opinion");

} if (x==3){

system. out. println("agree");

}

}

here is the error message that i get:

- nothing was printed to stdout

- stdout is not correct

test case table

test case x stdout feedback

#1 1 disagree

#2 2 no opinion

#3 30 - stdout is not correct

- nothing was printed to stdout

#4 9 - stdout is not correct

- nothing was printed to stdout

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The great length of north america causes the climate to be varied. true false
Answers: 2
question
Computers and Technology, 22.06.2019 13:50
The instruction ishl (shift left integer) exists in jvm but not in ijvm. it uses the top two values on the stack, replacing the two with a single value, the result. the sec- ond-from-top word of the stack is the operand to be shifted. its content is shifted left by a value between 0 and 31, inclusive, depending on the value of the 5 least signifi- cant bits of the top word on the stack (the other 27 bits of the top word are ignored). zeros are shifted in from the right for as many bits as the shift count. the opcode for ishl is 120 (0x78).a. what is the arithmetic operation equivalent to shifting left with a count of 2? b. extend the microcode to include this instruction as a part of ijv.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
You know the right answer?
Write the definition of a method printattitude, which has an int parameter and returns nothing. the...
Questions
question
Geography, 16.01.2020 07:31
question
English, 16.01.2020 07:31
question
English, 16.01.2020 07:31
Questions on the website: 13722367