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
In reference to computer communications, what does the term noise mean?
jeka94
Noise usually means static.
6 0
3 years ago
Read 2 more answers
What is one similarity between compiled and interpreted programming languages? (5 points)
Rashid [163]

Answer:

Both compiled and interpreted languages are high-level languages and translate code for a computer to understand.

Explanation:

The one similarity between compiled and interpreted languages is that they are both high-level languages.

A high-level language is a computer language written in easy to understand human language which is then converted to machine code for the computer to understand.  

A high-level language can either be interpreted or compiled.

An interpreted is a language in which the code is translated line by line before execution while a compiled language is one in which the source code is converted directly into machine language before execution.

So, <u>the similarity between both languages is that they are high level languages and translate code for a computer to understand. </u>

8 0
2 years ago
Your colleague received an E-mail from a bank that is requesting credit card and PIN number information. Which of the following
uysha [10]

Answer: A) Phishing

Explanation:

Phishing is type of attack in computer field that is processed to hack or steal the data of authorized user.The attacker acts as trusted party and then interacts with the authorized user through email or messages to gain  confidential information like pin code, credit card number, login details etc of that user.

  • According to the question, colleague is experiencing phishing as he has been requested for pin-code and credit-card number from a wrong source behaving as authorized bank.
  • Other options are incorrect because ransomware is attack that asks for ransom from authorized user for reviving their access. on system. Spoofing is falsifying as some other party to receive advantage.
  • Mail poisoning is inclusion of inappropriate details in email such as invalid email address etc.
  • Thus, the correct option is option(A).
0 0
3 years ago
What are the guidelines for creating forms and reports?
Genrish500 [490]

Answer:

 Form and reports are the documents which are used to create for include the information according to the particular requirements. These are the types of documents which include some extra information in the predefined information according the particular needs and requirements.

The following are the guidelines when developing forms and reports are:

  • If the data or information is in the form of table then, use the query module for defining the particular relationship of table.
  • Use the proper syntax and appropriate language to define the information in the forms and reports so, it become easy to the users or customers for access the information.
  • During the form development, we can also provide the validation requirement and many toolbar buttons to make easy for users.
7 0
3 years ago
Most simple computer programs follow the basic pattern defined by the acronym IPO. What does IPO mean with regards to programmin
Art [367]

Answer:

IPO means Input - Process - Output

Explanation:

The IPO model means that a computer program is given an input to process, it processes the given input and return an output as the result.

3 0
3 years ago
Other questions:
  • Which of the following is important to do when downloading a game to your
    8·1 answer
  • When driving, your attention is __________.
    5·2 answers
  • A car holds 16 gallons of gasoline and can travel 312 miles before refueling. Write aC++ program that calculates the number of m
    9·1 answer
  • Exceptions can be handled in all of these ways except:
    6·1 answer
  • An ink-jet printer is a type of impact printer. <br> a. True <br> b. False
    8·1 answer
  • Leo noticed that attackers have breached his wireless network. They seem to have used a brute-force attack on the WiFi protected
    13·1 answer
  • Even if you cannot afford it you should donate at least 5 of your earnings to charity true or false
    8·1 answer
  • IT specialists must display technical expertise and collaborative proficiency in the workplace. Select the IT specialist who dem
    7·1 answer
  • Which Windows installation method requires that you manually rename computers after the installation?​
    12·1 answer
  • What is the best motivation that you can do/give to make your employees stay? ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!