answer.
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
marusya05 [52]
2 years ago
5

Write an if-else statement that displays 'Speed is normal' if the speed variable is within the range of 24 to 56. If the speed v

ariable’s value is outside this range, display 'Speed is abnormal'.
Computers and Technology
1 answer:
kari74 [83]2 years ago
4 0

Answer:

import java.util.Scanner;

public class Speed{

int speed;

public Speed(int speed){

this.speed = speed;

}

public void checkSpeed(){

if(speed >= 24 || speed <= 56){

System.out.println("Speed is normal");

}

else

System.out.println("Speed is abnormal");

}

public static void main(String...args){

Scanner input = new Scanner(System.in);

int userSpeed = 0;

System.out.println("Enter a speed: ");

userSpeed = input.nextInt();

Speed obj1 = new Speed(userSpeed)

obj1.checkSpeed();

}

Explanation:

You might be interested in
Explain why each of the following names does or does not seem like a good variable name to represent a state sales tax rate.
tatyana61 [14]

a. stateTaxRate  - A good variable name because it represents what it holds, the state sales tax rate, without being too wordy. Also correctly capitalized in camelcase.

b. txRt  - A bad variable name because while short and simple, it is too hard to understand what the variable represents.

c. t  - A very bad variable name if you plan on using the variable often. Far too short and you will forget what it represents and is needed for.

d. stateSalesTaxRateValue  - A bad variable name because it is just too wordy. Cutting it down to A's variable name is much more reasonable

e. state tax rate  - A bad variable name and probably invalid because it has spaces in the name.

f. taxRate  - A good variable name if there are no other tax calculations other than state tax rate. Otherwise you would confuse state vs local tax rate or something, making it a bad variable name.

g. 1TaxRate  - A bad variable name because the number 1 has no reason being in the variable name. It doesn't add anything to the name.

h. moneyCharged - A bad variable name because it is not specific enough in explaining why the money is being charged and what for.

7 0
2 years ago
Object-oriented development could potentially reduce the time and cost of writing software because: Group of answer choices a) i
spayn [35]

Answer:

b) objects are resuable

Explanation:

In OOP there's code reuse where a method or any other body of code is defined once and called or reused severally.

3 0
2 years ago
A data center designer requested additional lighting for the entrance to the data center as well as the removal of a object whic
Ira Lisetskai [31]

Answer:

SURVEILLANCE-SPECIFIC DESIGN.

Explanation:

Defensible space offers a series of architectural guidelines that can be used in the design of new urban residential complexes to promote both the residential group’s territorial claim to its surroundings and its ability to conduct natural surveillance. The designs are: site interrelationship design, site design, street design and surveillance-specific design.

Surveillance-specific design can be used to increase general visibility by providing adequate lighting, by reducing or eliminating physical barriers to visibility, and by the visibility-promoting location of key areas (entrances, lobbies, elevator waiting areas, parking areas e.t.c.) so as to be directly visible from as many viewpoints as possible.

Since the data center designer requested additional lighting for the entrance to the data center as well as the removal of a object which is blocking security's view of the entrance, then it is an example of SURVEILLANCE-SPECIFIC DESIGN.

6 0
1 year ago
The initial value for a number field on a record is 1. A user updated the value of the number field to 10. This action invokes a
erik [133]

Answer: b. 11

Explanation:

//The  initial value is 1

//let call the value as x

x = 1

//then the user updated the value to 10

//so now x is 10

x = 10

// and update the workflow to 11

//so now the value of x is 11

x = 11

even if the programmer print x, so the output will be 11

3 0
1 year ago
Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate
Irina-Kira [14]

Answer:

SSL has operate in Application Layer to encrypt the information from user and  pass it to the TCP. To enhance TCP security developer can integrate the code of SSL with application layer.

Explanation:

SSL certificate is used to enhance the security of user data and encrypt the information of passwords, data transfer and other information to make it secure. This certificate is  installed at application layer to make all the information secure and send it to the Transmission Control Protocol (TCP) to send it further. The TCP can be enhanced more by adding SSL code to the application Layer of the Network.

4 0
1 year ago
Other questions:
  • Does the Boolean expression count &gt; 0 and total / count &gt; 0 contain a potential error? If so, what is it?
    8·1 answer
  • As you are planning your informative speech on the prevalence of Internet memes in pop culture and you wonder if your audience w
    14·1 answer
  • FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
    5·1 answer
  • Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n
    7·2 answers
  • You are the IT security administrator for a small corporate network. Samuel Garcia (sgarcia) has been away on vacation and has f
    9·1 answer
  • A student who used a regression model that included indicator variables was upset when receiving only the following output on th
    10·1 answer
  • What is an input to the Program Increment Planning process that highlights how Product Management plans to accomplish the Vision
    15·1 answer
  • Assume you have a project with seven activities labeled A-G (following). Derive the earliest completion time (or early finish-EF
    15·1 answer
  • Two middle-order batsmen are compared based on their performance in their previous cricket match.
    7·1 answer
  • Members of the sales team use laptops to connect to the company network. While traveling, they connect their laptops to the inte
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!