Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Intro to Java Programming Class This assignment will focus on the use of arithematic operators. Casting will also be needed and will be described later

Intro to Java Programming Class

This assignment will focus on the use of arithematic operators. Casting will also be needed and will be described later in the assignment.

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 value using the Scanner object.

Round the input value down to the nearest integer (floor).

Output the value input.

Output the rounded 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 value input.

7. Output the rounded (floor) double value.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

dy dx Find the derivative of the function y=(4x+3)5(2x+1)2.

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago