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
algol [13]
3 years ago
5

Scientists measure an object’s mass in kilograms and its weight in newtons. If you knowthe amount of mass of an object in kilogr

ams, you can calculate its weight in newtons withthe following formula: weight 5 mass 3 9.8
Write a program that asks the user to enter an object’s mass, and then calculates its weight.If the object weighs more than 500 newtons, display a message indicating that it is tooheavy. If the object weighs less than 100 newtons, display a message indicating that it istoo light
Computers and Technology
1 answer:
Phoenix [80]3 years ago
7 0

Answer:

public class WeightCalculator {

   

   private static DecimalFormat df2 = new DecimalFormat("#.##");

   

   public static void main(String args[]){

       //create scanner to receive user input

       Scanner in = new Scanner(System.in);

       //alert user to input mass

       System.out. println("Enter the Mass in Kg");

       //collect the input as a string

       String s = in. nextLine();

       //convert string to double and multiply by 9.8

       Double weight = Double.valueOf(s)* 9.8;

       

       //Print out answer formatted to 2 decimal place

       System.out. println("The Weight is " + df2.format(weight) + "N");

       

       //conditional statement to check if weight is less than 100

       if (weight < 100){

           System.out. println("Oops, it is too light");

       }

       //conditional statement to check if weight is more than 500

       if (weight > 500){

           System.out. println("Oops, it is too heavy");

       }            

   }

}

You might be interested in
Positive and negative impacts of chemical industries
Nonamiya [84]
5. Positive and Negative Impact of chemical industries. Here are the positive impacts first: => It can discover a chemical product that can be helpful for us humans like physical beautification, medicines to a certain diseases and more that is beneficial to our health. => It can also help us learn more about the chemicals that is presents in our planet. Here are the lists of the negative impacts: => Some Chemicals can be harmful to the nature and also to our body. => Some chemical can cause diseases especially those harmful ones.
4 0
3 years ago
Read 2 more answers
blank protects equipment from too much current by tripping a switch that breaks the circuit, stopping the flow of electricity
e-lub [12.9K]

FUSE! (BRAINLIEST PLEASE)


4 0
3 years ago
You're setting up some VMs to test an application you're considering making available to employees of the small company you work
IgorLugansk [536]

Answer:

Snapshots in VirtualBox, Hyper-V, and please check explanation.

Explanation:

You should never test the software on your PC as you never know what virus or threat they bring with them. Even when you are a software company and testing your own new software, you should use the VM, as it is safe. Any adverse effect can be tackled as the VM is made to be destroyed some day.

You can install numerous OS on your VM. The two best are certainly Virtual Box and the Hyper-V from VMWare. Remember, if you dont want to use the licensed version of certain OS, the trial versions are always available for free, and you can install them on the VMs.

There is a snapshot option on the VirtuabBOX. You are only required to create the snapshot after creating and configuring the VM. It supports Windows, Linux and Mac. So you can install almost any OS. However, VMWare Player does not support the Snapshot, but it provides s similar option known as Checkpoints. However, VMware Workstation supports Snapshots, though they might be costly.

If you are on OS X you can make use of Parallels.

However, never enable file sharing, and stay away from Bridge mode as well as never use your original accounts. File sharing will inject the malware if any to all places on network. The bridge mode connects the VM directly to the network, which otherwise remain hidden behind NAT. And use of personal accounts can cost you them, and this can be quite a big loss definitely.  

6 0
3 years ago
Read 2 more answers
It is easier to make an object move across the screen by using the tweening function rather than creating each individual frame
Vesna [10]
Uhhhh I believe it’s true if it’s wrong I’m srry ....
3 0
3 years ago
What hand glove is used to prevent electric shock and why​
Ostrovityanka [42]

Answer:

Insulated gloves because their made of synthetic rubber.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • The information security organization performs a significant role in the implementation of solutions that mitigate risk and cont
    6·1 answer
  • True or false An electronic form uses input fields in which the user can enter data from their own computer and then transmit t
    10·1 answer
  • Typically, a programmer develops a programâs logic, writes the code, and ____ the program, receiving a list of syntax errors.
    6·1 answer
  • Which one of the following is an example of hacktivism according to you and why?
    11·1 answer
  • What is the preferred procedure for putting customers on hold​
    13·2 answers
  • Write a Python program to do the following:
    12·1 answer
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • (You don’t have to answer it’s just for you for points. Here is you’re riddle)
    9·2 answers
  • What is the output for the following program?
    6·2 answers
  • How do you get lugia in pokemon alpha saphire
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!