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
Write a method called rotate that moves the value at the front of a list of integers to the end of the list. For example, if a v
polet [3.4K]

Answer:

Explanation:

public void rotate()

{

if(front == null)

return;

ListNode current = front;

ListNode firstNode = current;

while(current.next != null)

{

current = current.next;

}

current.next = front;

front = firstNode.next;

firstNode.next = null;

}

4 0
3 years ago
Java question
skad [1K]

Answer:

To be honest why would you want to enter one character. Anyways the answer is option 4

6 0
3 years ago
1)Write the command that moves the file data1 into the directory testdata:
mrs_skeptik [129]
1) mv data1 testdata/
2) mv data1 ../
3) ls letters

These are the *nix commands. You can find out more by looking at their man pages. You can get more info about the man subsystem by running: man man
8 0
3 years ago
The choice of database does not have any impact on the relevancy of search results?
Nookie1986 [14]

Answer:

When searching for articles using library databases, the following tips should increase the relevance of your results. Quotation marks around two or more keywords - phrase searching - ensures that the results will include the exact phrase.

Explanation:

8 0
3 years ago
Terri needs to insert a cover page into her document. Where should she go to access the commands to do so? Insert tab, Objects g
dexar [7]

Answer:

Insert tab, Pages group

Explanation:

It just be like dat

7 0
2 years ago
Other questions:
  • Ruby is creating a presentation. She wants each slide displayed at intervals of five seconds. Which feature in the presentation
    6·2 answers
  • Remember to save _____ and be certain that you have your files saved before closing out.
    11·1 answer
  • If you have machines doing jobs, fewer staff are needed, therefore costs are
    5·2 answers
  • Describe an application where a parallel circuit might work better than a series circuit.
    15·1 answer
  • The term computer ________ is used to describe someone who is familiar enough with computers to understand their capabilities an
    12·1 answer
  • If you have two redo log groups with four members each, what’s the optimal number of disks you need to provide appropriate prote
    5·1 answer
  • What is it called to persist in trying to multitask can result in this; the scattering bits of one’s attention among a number of
    9·1 answer
  • Which are two main areas of the properties inspector
    7·1 answer
  • EASY POINTS who is your favorite in family<br> 1. mom<br> 2. dad<br> 3. sister<br> 4. brother
    10·2 answers
  • Task 2
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!