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
Eddi Din [679]
3 years ago
5

Write a program that asks the user to enter an object’s mass, then calls a // function to return the object's weigh in newtown.

If the object weighs // more than 500 newtons, the function also displays a message indicating that // it is too heavy. If the object weighs less than 100 newtons, the function // also displays a message indicating that it is too light.
Computers and Technology
1 answer:
lisov135 [29]3 years ago
4 0

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter the mass");

       double mass = in.nextDouble();

       double weight = calWeight(mass);

       System.out.println("The weigth is "+weight);

   }

   static double calWeight(double mass){

       double weight = mass*9.80665; // assume a = accelation due to gravity = 9.80665N

       if(weight>500){

           System.out.println("Too Heavy");

       }

       else if(weight<100){

           System.out.println("Too Light");

       }

       return weight;

   }

}

Explanation:

  • Using Java programming language
  • The main method is created to request and store a variable, mass in kilogram. The main method call calWeight() and passes the value for mass
  • A method calWeight() is created that calculates the weight in newtons (mass * 9.8).
  • The method checks if the weight is greater than 500 (prints too heavy) if less than 100(prints to light)
  • Returns the weight  

You might be interested in
Reading a news release about a product is an example of <br> research.
Oduvanchick [21]

Answer:

Yes, it is true, because it informs you

Explanation:

5 0
3 years ago
How to count the total number of users from backend reactjs.
igomit [66]

Explanation:

If you are only using firebase auth, you can use the listUsers function of the admin module (limited to 1000 items per page).

3 0
2 years ago
How do I make Dank memes
Dmitrij [34]

Well bro you see what you gotta do is be a gamer.

HIT OR MISS

I GUESS THEY NEVER MISS

H U H ?

YOU GOT A BF?

I BET HE DOESNT KISS YA

M U A H


It be like that sometimes b r u h

6 0
3 years ago
Read 2 more answers
Three homework questions I can't figure out, please help?
Burka [1]

It A

iT b

YOU CANT TRY THE TWO ONE THE WHO ARE WRITE

8 0
3 years ago
15 points. Please give an actual answer and not some random thing. this is not just free points. Correct answer will receive bra
trapecia [35]

Answer:

i think its b

Explanation:

i did the test and got it right

7 0
3 years ago
Read 2 more answers
Other questions:
  • Not providing guarding or fall protection for workers on a 25-foot scaffold. The resulting fall would most likely end in death,
    6·1 answer
  • In order to plan George’s birthday, his father gave him a list of people who attended his birthday for the last five years. What
    8·1 answer
  • Signing up for a(n) ____ will automatically provide you with web content that is updated on a regular basis.
    15·1 answer
  • The goal expressed in this definition states that data visualization is about ______ . 1. Interpreting 2. Perceiving 3. Facilita
    6·1 answer
  • What type of engineer is interested in designing, developing, and building different machines, devices, and tools? A.aerospace
    8·2 answers
  • Which function calls would provide the most helpful test of this function? Remember: With tests, you are attempting to figure ou
    5·1 answer
  • This is science I just couldn’t find it
    15·1 answer
  • Hey everyone. I am so bored
    14·2 answers
  • What is smarta Art ? ​
    10·1 answer
  • WHO WANT P O I N T S.................................................
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!