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
Def rectangle_area(base,height):
user100 [1]

Using the computer language in python to write a function code that calculates the area of ​​a rectangle.

<h3>Writting the code in python:</h3>

<em>def rectangle_area(base, height):</em>

<em> z = base*height  # the area is base*height</em>

<em> print("The area is " + str(z))</em>

<em>rectangle_area(5,6)</em>

See more about python at brainly.com/question/18502436

#SPJ1

6 0
2 years ago
You compared each letter in the correct word to the letter guessed.
Murrr4er [49]

Answer:

wow

Explanation:

www

7 0
2 years ago
Consider the university enrollment database schema: 547 Student(snurn: integer, snarne: string, majoT: string, level: string, ag
trapecia [35]

Enroll a student identified by her snum into the class named 'Introduction to Database Systems' is the following transactions, state the SQL isolation level you would use.

1. Enroll a student identified by her snum into the class named 'Introduction to Database Systems'.

<u>Explanation:</u>

Since enroll is unique in the university enrollment database schema and field name is SNUM and it is data type is an integer. To identify student class name and department name and name of student SNUM field is used for searching in university enrollment database schema. Enrollment changing is not possible of the student’s not possible or not good practices in university enrollment database schema.

If a query had been made class wise or department wise enrollment is played an important role.

For  assign, a faculty is made on the class id or  department id.

8 0
4 years ago
Two ways that a deer depends on plants to survive
Nastasia [14]
Food and oxygen would be the answer
4 0
3 years ago
Read 2 more answers
Secure Hashing Algorithm (SHA) is an algorithm for generating cryptographically secure one-way hash, published by the National I
Naily [24]

Answer:

64 byte.

It's not bit is byte.

Explanation:

Secure Hash Algorithms (SHA) :- These are a family of cryptographic hash functions. There are basically four types of secure hash algorithms for generating cryptographically secure one-way hash.They are as following:-

SHA-0

SHA-1

SHA-2

SHA-3

SHA -2 consists of SHA-512 and the block size used by it is 64 byte or 512 bits.

8 0
3 years ago
Other questions:
  • Whichof the following is not a standard method called as part of the JSPlife cycle?jspInit()jspService()_jspService()jspDestroy(
    12·1 answer
  • A design tool helps you plan, evaluate, and explain your ideas to create a product. Some examples of design tools are outlines,
    10·2 answers
  • To aid Android app developers, who must account for multiple screen sizes and resolutions, Android has introduced the ____, whic
    15·1 answer
  • Which of the following best describes a good role model?
    6·2 answers
  • Using either a UNIX or a Linux system, write a C program that forks a child process that ultimately becomes a zombie process. Th
    8·1 answer
  • Which type of optical scanner works in a manner similar to a copy machine?
    15·1 answer
  • I live in Alabama and I’m ab to leave to go on a 3 week trip to France and I’m wondering how I can get LTE for my IPhone 6s Plus
    15·2 answers
  • Develop a C program that calculates the final score and the average score for a student from his/her (1)class participation, (2)
    9·1 answer
  • How do you find a single number or name you want in a
    7·1 answer
  • Which website offers guidance on putting together a checklist to provide guidance on configuring and hardening operating systems
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!