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
Which feature of a typical professional networking site helps users add professional details to their profile ?
ludmilkaskok [199]
All I  could find are networking cites allow people to take pics of themselves for a personal effect! hope this is what your looking for.
7 0
1 year ago
Read 2 more answers
5.6 Look carefully at how messages and mailboxes are represented in the email system that you use. Model the object classes that
Annette [7]

Answer:

See explaination for the details of the answer.

Explanation:

A class is a structured diagram that describes the structure of the system.

It consists of class name, attributes, methods and responsibilities.

A mailbox and an email message has some certain attributes such as, compose, reply, draft, inbox, etc.

See attachment for the Model object classes that might be used in the system implementation to represent a mailbox and an email message.

5 0
2 years ago
6. Write pseudo code that will perform the following. a) Read in 5 separate numbers. b) Calculate the average of the five number
Alex

Answer:

Pseudo CODE

a)

n= Input “Enter 5 integer value”

b)

sum=0.0

For loop with i ranging from 0 - 5

Inside loop sum=n[i]+sum

Outside loop avg= sum/5

Print avg

c)

small=n[0] # assume the first number in the list is smallest

large= n[0] # assume the first number in the list is largest

For loop with i ranging from 0 - 5

Inside loop if n[i]<small #if any another number is smaller than small(variable)

Inside if Then small=n[i]

Inside loop if n[i]>large # if any another number is larger than large(variable)

Inside if then large=n[i]

Print small

Print large

d)

print avg

print small

print large

8 0
2 years ago
A Color class has three public, integer-returning accessor methods: getRed, getGreen, and getBlue, and three protected, void-ret
jek_recluse [69]

Answer:

The following code are:

public void dissolve() {

setRed(getRed()+1);

setGreen(getGreen()+1);

setBlue(getBlue()+1);

alpha+=1;

}

Explanation:

Here, we define the void type function "dissolve()" inside it, we set three function i.e, "setRed()", "setGreen()", "setBlue()" and then we increment the variable "alpha" by 1.

Inside those three mutators method we set three accessor methods i.e, "getRed()", "getGreen()" , "getBlue()" and increment these accessor by 1.

The values will not be returned by the mutator functions, the accessor will be returned the values.

6 0
2 years ago
You are an ISP. For the Address Block 195.200.0.0/16 a. If you have 320 Customers that need 128 addresses/customer - will there
12345 [234]

Answer:

a. The network will not satisfy the customers because the required addresses is 128 but what can be offered is 126.

b. 195.200.0.0/22

Explanation:

195.200.0.0/16

The number of bits to give 512 is 9

2^9=512

2^8=256 which is not up to our expected 320 customers that requires a network ip

Note we have to use a bit number that is equal or higher than our required number of networks.

The number of host per each subnet of the network (195.200.0.0/25) is (2^7)-2= 128-2=126

The network will not satisfy the customers because the required addresses is 128 but what can be offered is 126.

b. 64 customers requires  6 bits to be taken from the host bit to the network bit

i.e 2^6 = 64

195.200.0.0/22

The number of host per each subnet of the network (195.200.0.0/22) is (2^10)-2=1024 - 2 = 1022 hosts per subnet

This network meet the requirement " 64 customers want 128 addresses/customer "

5 0
2 years ago
Other questions:
  • Rene has secured her wireless network. However, she is worried about securing her router against newfound vulnerabilities. Which
    7·1 answer
  • Refer to the exhibit. pc1 issues an arp request because it needs to send a packet to pc3. in this scenario, what will happen nex
    9·1 answer
  • If you have long column labels with columns so wide that they affect the readability of a worksheet, you should first
    7·1 answer
  • Topological sort requires only a tiny addition to the DFS algorithms. Exactly one of the following data structures is required t
    9·1 answer
  • Identify the correct language concept or term from the drop-down menu. A Programming Language is a language that physically runs
    12·2 answers
  • Define a new object in variable painter that has properties "name" storing "Vincent van Gogh"; "artworks" storing "The Starry Ni
    13·1 answer
  • Mile markers appear as _____ green signs.
    6·2 answers
  • For his class project, Matt has to create an image in a color scheme that has shade or tint variations of the same hue. Which co
    7·1 answer
  • Your project must satisfy the following requirements:
    7·1 answer
  • The __________ vulnerability assessment is a process designed to find and document selected vulnerabilities that are likely to b
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!