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
olga_2 [115]
3 years ago
15

A video game controller contains the buttons: A, B, X, Y. When the player presses A their character Jumps. When the player press

es BY their character Crouches. When the player presses X their character Punches. When the player presses Y their character Flies. When the player presses anything else Pause menu shows up Assume your program contains a variable named button that holds a character which indicates the button the player has pressed. Write the switch statement that displays a message explained the user the action that was taken.
Computers and Technology
1 answer:
Lina20 [59]3 years ago
3 0

Answer:

Explanation:

The following switch statement takes in the variable button as a parameter and outputs a statement saying what the character did due to the button being pushed.

switch (Character.toLowerCase(button.charAt(0))) {

           case 'a': System.out.println("Your character has Jumped"); break;

           case 'b': System.out.println("Your character has Crouched"); break;

           case 'x': System.out.println("Your character has Punched"); break;

           case 'y': System.out.println("Your character has Flown"); break;

           default: System.out.println("Pause Menu has appeared"); break;

       }

You might be interested in
Pls answer 10 points ​
AlekseyPX

Answer:

1. C

5.b

Explanation:

1. Is c because it is in the short cut key

5. Is B because it is the last choice

3 0
3 years ago
Read 2 more answers
Which Boolean operator enables you to exclude a search term?
Lisa [10]

It is letter D. but i might be incorrect, please contact your teacher for further information. sorry if I got your answer wrong... :(

4 0
3 years ago
Read 2 more answers
You have a computer at home. The computer is connected to the Internet through a dial-up connection. Every time you connect to t
worty [1.4K]

Hiya!

When you connect to the internet (especially through a dial-up connection), your computer must make the request for network resources. This is usually done through a Modem, a device designed to establish and split the connection among your devices.

Fun fact; a dial up connection uses the same radio frequencies that you would use to talk on the phone; and they're in the audible spectrum. When you start up that connection, the reason all those funny noises happen is because it's "talking" to your ISP over those lines.

Hope this helps!

3 0
3 years ago
Which property of a text element controls how the browser handles text that does not fit within the element box?
BaLLatris [955]
Margin because it is always on the end of document
6 0
4 years ago
Given four inputs: a, b, c & d, where (a, b) represents a 2-bit unsigned binary number X; and (c, d) represents a 2-bit unsi
Amiraneli [1.4K]

Answer:

z = a.c' + a.b.d' + b.c'.d'

Explanation:

The truth table for this question is provided in the attachment to this question.

N.B - a' = not a!

The rows with output of 1 come from the following relations: 01 > 00, 10 > 00, 10 > 01, 11 > 00, 11 > 01, 11 > 10

This means that the Boolean expression is a sum of all the rows with output of 1.

z = a'bc'd' + ab'c'd' + ab'c'd + abc'd' + abc'd + abcd'

On simplification,

z = bc'd' + ab'c' + ac'd' + ac'd + abc' + abd'

z = ac' + abd' + bc'd'

Hope this helps!

6 0
4 years ago
Other questions:
  • How can you recognize an unsecured wireless network?
    9·1 answer
  • Write a Python program that creates a dictionary containing course numbers and the room numbers of the rooms where the course me
    7·1 answer
  • ¿Por qué es importante generar proyectos innovadores?
    8·1 answer
  • Which formulas would work to combine cells with first, middle, and last names from columns A through C and row 2 into a new cell
    14·2 answers
  • 12. Write C statement(s) that accomplish the following. a. Declare int variables x and y. Initialize x to 25 and y to 18. b. Dec
    12·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    10·1 answer
  • Read the citation example, and then use the drop-down menus to identify each part.
    8·2 answers
  • What’s GIGO<br> Please write it in full form
    15·1 answer
  • What kind of files are automatically blocked in outlook?
    7·1 answer
  • What is table,form,query and report ?short ans​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!