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!
- Create a Java program.
- The class name for the program should be 'DecimalFloor'.
- 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:
- Create a Scanner object using the Scanner class found in the java.util package.
- Output a prompt asking the using to input a decimal value.
- Accept the input value into a variable capable of holding decimal values.
- Convert the decimal value to an integer value. This will drop all the decimal positions to the right of the decimal.
- Covert the integer value to a double value.
- Output the initial decimal value input.
- Output the double value from step 5.
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
Get step-by-step solutions from verified subject matter experts
