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
pickupchik [31]
3 years ago
14

Use a switch statement to display "one" if the user has entered 1, "two" if the user has entered 2, and "three" if the user has

entered 3. If a number other than 1, 2, or 3 is entered, the program should display an error message: "Enter one of the numbers - 1, 2, or 3."
Computers and Technology
1 answer:
astra-53 [7]3 years ago
4 0

Answer:

import java.util.Scanner;

public class num5 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter one the numbers - 1, 2, or 3.");

       int num = in.nextInt();

       switch (num){

           case 1:

               System.out.println("one");

               break;

           case 2:

               System.out.println("two");

               break;

           case 3:

               System.out.println("three");

               break;

           default:

               System.out.println("Error");

       }

   }

}

Explanation:

  • Using Java Programming Language
  • User Scanner Class to prompt, receive and store user's input
  • Use a switch statement with three cases as required by the question to output one, two or three
  • Use the default statement to handle any other case
You might be interested in
Which statement is false? Classes are reusable software components. A class is to an object as a blueprint is to a house. Perfor
Korolek [52]

Answer:

The last option i.e "A class is an instance of its object" is the correct answer of this question.

Explanation:

A class is a collection of variable and method . The class is the blueprint of the object that means class is physical space entity and object is a runtime space entity.It is the the reusability feature of the programming component.

Following are the  syntax to declare any class.

                     Class classname

<u>For Example</u>: class test1

With the help of class we can achieve the inheritance, encapsulation and abstraction etc.

All the other options except the last one are correct option. Because option(1), option(2) and option(3) follow the property of class and object .  that's why last option is False.

4 0
3 years ago
If a full disk encryption (FDE) password is forgotten, what can be incorporated to securely store the encryption key to unlock t
Reptile [31]

Answer:

Key escrow.

Explanation:

If a full disk encryption (FDE) password is forgotten, a key escrow can be incorporated to securely store the encryption key to unlock the disk.

A key escrow can be defined as a data security method of storing very essential cryptographic keys.

Simply stated, key escrow involves a user entrusting his or her cryptographic key to a third party for storage.

As a standard, each cryptographic key stored or kept in an escrow system are directly linked to the respective users and are encrypted in order to prevent breach, theft or unauthorized access.

Hence, the cryptographic keys kept in an escrow system are protected and would not be released to anyone other than the original user (owner).

<em>Therefore, when a full disk encryption (FDE) password is forgotten, a key escrow if incorporated can be used to retrieve the password. Subsequently, the password would then be used to unlock or decrypt the disk.</em>

3 0
3 years ago
_________ is the primary measurement used to gauge your typing ability
Reil [10]

Answer:

Words per minute

Explanation:

5 0
3 years ago
I store data that the CPU needs. What am I?
Citrus2011 [14]

Answer:

Memory

Explanation:

Memory send commands to the CPU . Alternative modes of memory exist, and each one of them plays an essential role in operating a software machine.Memory is commonly called storage. Either the storage is unstable or non-volatile.

4 0
3 years ago
Read 2 more answers
Alternating Current or AC is better for use in ___________, while DC direct current is needed in _________ .
PIT_PIT [208]
<span>C electric power transmisson and electronics</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • Which language is the most popular language for writing apple os x?
    9·1 answer
  • Need help with just #8
    12·1 answer
  • Write an application that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer val
    6·2 answers
  • In general, the farther you are from other road users, the A. lower your crash risk B.higher your crash risk C. slower they are
    6·1 answer
  • If all the data in a database is not physically located in one place, it would be a(n _______ database.
    5·1 answer
  • The quicksort pivot value should be the key value of an actual data item; this item is called the pivot. True or False?
    11·1 answer
  • If you want to transfer information transform STM to LTM, it is essential that you make the information ______________________.
    9·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • A ____________ is a collection of commands given a name.
    11·1 answer
  • How to use 2 tabs at once on my Lenovo yoga book?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!