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
What purpose would tracking changes be most useful for?
olya-2409 [2.1K]
So, you can be able to make a prediction and understand the cycle.
6 0
3 years ago
The Twitter website has become a de facto first source for many important events in the last decade. Twitter's hashtag feature l
timurjin [86]

Answer:

..........................................?

7 0
3 years ago
Read 2 more answers
Web navigation gives the user a sense of control.
Leviafan [203]
1. a.
2. d
3. b
I hope this helps
6 0
3 years ago
Read 2 more answers
Energía de movimiento de los átomos o moléculas
olasank [31]

Answer:

g

Explanation:

4 0
2 years ago
Keyword stuffing is considered to be a black hat technique for SEO and is highly suggested today by Google.
klemol [59]

Answer:

False

Explanation:

Keyword stuffing is a practice to insert an unusual large number of tag in a website to increase the page ranking in search results. This is considered an unethical Search Engine Optimization (SEO).

Google consider Keyword stuffing as unethical and it doesn't help to boost the rank of a website. More advanced algorithms are being used to filter those of the meta tags which are irrelevant or excessively out of context in a website.

3 0
3 years ago
Other questions:
  • Write a program to test your functions as follows: Obtain a random number seed from the command line of your program using comma
    10·1 answer
  • True or False? A supervisory control and data acquisition (SCADA) device is a computer that controls motors, valves, and other d
    13·1 answer
  • After configuring a static IP address on a desktop computer, the technician finds that he cannot communicate with other devices
    10·1 answer
  • Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page?
    9·1 answer
  • Mrs. Patel uses a computer program to balance her checkbook. Which of the following best explains how the
    13·1 answer
  • Why 3 phase motors so effective?
    5·1 answer
  • ________ are the primary means of authentication for a user's computer and other networks and servers to which the user may have
    10·1 answer
  • Which is the correct notation to specify the following inheritance?
    8·1 answer
  • Question 1
    8·1 answer
  • Distinguish between a computer drive and computer driver​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!