Dana Upload Assignment Mas x Code This in Java I Cheg X C Secure https:// blackb
ID: 3827972 • Letter: D
Question
Dana Upload Assignment Mas x Code This in Java I Cheg X C Secure https:// blackboard.com/webapps/assignment/uploadAssignment?content id 328629 1&course; id 213764. 18kgroup id: &mode; view pps Bookmark LG myCampus secure Lo Y Yahoo M D Java An Introductio webAssign LOGIN PDF Data Structur Blackboard Learn Sy Step-by-step Calculat g SGRHO Upload Assignment: Mass and Weight special Topics Java17/SP A Home Page Cancel Save Draft Subm Information Discussions Groups 1. Assignment Information Tools Help Points Possible Assignments 25 Scientists Measure an objects' mass in kilograms and it weight in newton if you know the amount of mass that an object has, you can calculate its weight in newtons, with the Example Codes following fomula: Weight Mass X 9.8 Write a program that asks the user to enter and objects mass, and then calculate and display its weight. If the object weighs more than 1,000 newtons, display a message indicating that it is too heavy. If the object is less than 10 newtons, display a message indicating that the object is too light. This program will be due NEXT THURSDAY FEBURARY 9!! lf you have any questions please come by my office or email me!!! 2. Assignment Submission Text Submission Write Submission n G A 8:24 PM 4/2TI2017Explanation / Answer
import java.util.Scanner;
public class MassAndWeight {
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter objects mass: ");
double mass = sc.nextDouble();
double weight = mass*9.8;
if (weight > 1000)
{
System.out.println("Weigh : " + weight + " N : Too Heavy");
}
else if (weight < 10)
{
System.out.println("Weigh : " + weight + " N : Too light");
}
else
{
System.out.println("Weigh : " + weight + " N");
}
sc.close();
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.