subject

Follow the directions below to submit Assignment 2: 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.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 13:50, almostnevercbbc
Implement the dining philosophers problem (described on pages 167-170 in the textbook (chapter 2.5. create a graphical user interface - showing which philosopher is eating, and which is waiting/thinking at any given time. show the forks. use java programming language for this project.
Answers: 2
image
Computers and Technology, 22.06.2019 17:00, Janznznz1121
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
image
Computers and Technology, 23.06.2019 03:10, nxusasmangaliso8780
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
image
Computers and Technology, 23.06.2019 18:50, ana7496
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
You know the right answer?
Follow the directions below to submit Assignment 2: Create a Java program.
The class name for...

Questions in other subjects:

Konu
Mathematics, 13.09.2021 04:20
Konu
Mathematics, 13.09.2021 04:20
Konu
Biology, 13.09.2021 04:20
Konu
Mathematics, 13.09.2021 04:20