subject
Computers and Technology, 17.01.2020 19:31 kasey59

Mass and weight
scientists measure an object’s mass in kilograms and its weight in newtons. if you know the amount of mass that an object has, you can calculate its weight, in newtons, with the following formula:

weight = mass x 9.8

write a program that asks the user to enter an object’s mass, and then calculate its weight. if the object weighs more than 1000 newtons, display a message indicating that it is too heavy. if the object weighs less than 10 newtons, display a message indicating that the object is too light.

note: you must use the joptionpane class to read input (input dialog box) and display output (message dialog box). also, remember that the public class and the filename of the source code file must match.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
You know the right answer?
Mass and weight
scientists measure an object’s mass in kilograms and its weight in newtons. if...
Questions
question
Mathematics, 27.04.2021 17:30
question
Mathematics, 27.04.2021 17:30
question
Chemistry, 27.04.2021 17:30