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
marusya05 [52]
4 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]4 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
You find information that you know to be classified on the internet. What should you do.
melomori [17]

A person is to find the information to be classified on the internet  are the best in the screenshot.

What is internet?

The word “internet” is also referred to as “net.” The global system of networks known as the Internet. Online services offered via the Internet include social media, email, and others. The without internet  are the not possible to share the information at the time.

A person is to find the information through which the internet is the best to justify. There used of the internet are the search the information with the help of the internet are the mic, keyboard. The information are the save and the screenshot was the used.

As a result, the person is to find the information to be classified on the internet  are the best in the screenshot.

Learn more about on internet, here:

brainly.com/question/13308791

#SPJ2

5 0
1 year ago
Read 2 more answers
In a bubble sort, you use a(n) ____ loop to make pair comparisons.
GarryVolchara [31]
In a bubble sort, you use an inner loop to make pair comparisons.
5 0
3 years ago
A good reference point for determining the position of a line or curb in front of you is your __________ . A. Hood ornament B. L
Hatshy [7]
I am pretty sure it’s A
5 0
3 years ago
What are the chances that we are living in a simulation? (Percentage)
harkovskaia [24]
Round about 95% Chance to living in a Simulation
5 0
3 years ago
Read 2 more answers
What does 4g consistâ of?
stellarik [79]
The answer is  (C) broadband cellular networks

Over the past decade, a majority of the mobile service providers have built 3G networks that use packet-switching technologies. Over time, 3G evolved into HSPDA which is five times faster than 3G. Predictably, 4G networks are now commonplace and are built from LTE and Mobile WiMAX.
5 0
4 years ago
Other questions:
  • _______ ______ is the creation of a computer program by utilizing pictorial elements. Question 36 options: A. Assembly Programmi
    7·2 answers
  • What is the definition of an extinct species?
    8·2 answers
  • A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
    8·1 answer
  • Is there anyone who is learning coding if so then can you tell me how to be perfect in coding​
    14·1 answer
  • The _____ is the button that you push to take a photograph. i think its B Help PLZ
    5·1 answer
  • Which of the following is the answer?
    5·1 answer
  • Join my me et.goo gle.etj-dovn-kds​
    11·1 answer
  • Guys, if I'm going back to 505 and it's a 7-hour flight or a 45-minute drive how do I get to 505?
    12·1 answer
  • Using the arrow key you can adjust the position of a selection in increments of
    7·1 answer
  • which of the following is a scenario in which an it support technician would most likely be required to implement the alternate
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!