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
Containers for contaminated sharps must have several characteristics. What’s missing from the list? PuContainers for contaminate
Nadya [2.5K]
All sharps containers must be stored upright,be puncture-resistant, be labeled or color-coded red & leakproof on both the sides & the bottom! The last one is the one missing!
4 0
3 years ago
Read 2 more answers
Define computer architecture?
tia_tia [17]

Answer:

computer architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer systems. The architecture of a system refers to its structure in terms of separately specified components of that system and their interrelationships.

4 0
2 years ago
List any four e-commerce website​
Ipatiy [6.2K]

Answer:

Amazon. Founded in the US in 1994, Amazon started as an online bookstore that later diversified to products including media, electronics, apparel, furniture, food, toys, and jewelry.

eBay. ...

Walmart. ...

Etsy. ...

Home Depot. ...

Target. ...

Best Buy. ...

Wayfair.

5 0
3 years ago
Read 2 more answers
In Online Data Extraction data is extracteddirectly from the ------ system itself.o Hosto Destinationo Sourceo Terminal
barxatty [35]

Answer:

system itself.

Explanation:

In Online Data Extraction data is extracted directly from the system itself.

4 0
3 years ago
You notice that somehow you have duplicate records for some of your clients in your database. What should you do?
IRINA_888 [86]

Inspect them and make sure that they are exact copies then delete one if they are the same.

5 0
2 years ago
Read 2 more answers
Other questions:
  • Todd, a travel agent, lost his job due to no need for his skill. This is an example of what type of unemployment?
    12·1 answer
  • Discuss what they need to consider if they wish to use their devices when they are away from home?
    6·1 answer
  • when two pieces of cui or other unclassified information are posted online together or attached together in an email and result
    5·1 answer
  • Which PowerPoint options can users customize?
    9·1 answer
  • In a _____ network, each device on the network is attached to a central server. If the server fails, then the other devices will
    8·1 answer
  • Which of the following is not a type of Internet Job Board? Options Resume Blaster Professional Association Target Applicants We
    8·1 answer
  • A group of users is unable to connect to the network. When testing several of the PCs and issuing the command ipconfig, the tech
    10·1 answer
  • Stroke weight - ____ of the line around a shape or size of the point
    8·1 answer
  • Challenge activity 1.11.1: using constant in expression is not working for me. Can any one help me find the right code?
    12·1 answer
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!