Question: JAVA PROGRAMMING! Create a Java program. The class name for the program should be 'DecimalFloor'. In the main method you should perform the following: Create

JAVA PROGRAMMING!

  1. Create a Java program.
  2. The class name for the program should be 'DecimalFloor'.
  3. In the main method you should perform the following:
    • Create a Scanner object.
    • Input a decimal /double value using the Scanner object.
    • Convert the input decimal/double value to an integer value (this will drop the decimal from the decimal/double value input).
    • Output the decimal/double value input.
    • Output the double/decimal value after converting the integer value back to a decimal value.

Pseudo flowchart for the assignment program:

  1. Create a Scanner object using the Scanner class found in the java.util package.
  2. Output a prompt asking the using to input a decimal value.
  3. Accept the input value into a variable capable of holding decimal values.
  4. Convert the decimal value to an integer value. This will drop all the decimal positions to the right of the decimal.
  5. Covert the integer value to a double value.
  6. Output the initial decimal value input.
  7. Output the double value from step 5.
JAVA PROGRAMMING! Create a Java program. The class name for the program

JAVA PROGRAMMING! 1. Create a Java program. 2. The class name for the program should be 'DecimalFloor'. 3. In the main method you should perform the following: o Create a Scanner object. o Input a decimal /double value using the Scanner object. o Convert the input decimal/double value to an integer value (this will drop the decimal from the decimal/double value input). o Output the decimal/double value input. o Output the double/decimal value after converting the integer value back to a decimal value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!