Write a program that prompts the user to input a decimal


JAVA PROGRAMMING ASSIGNMENT

TASK 1

Write a program that prompts the user to input a decimal number and outputs the number rounded to the nearest integer.

Remember the rules around proper development style and form, including adding comments. A software developer should always add comments to their code so other developers (or in this case the instructor) understand what the intent of the program is.

Submit your compiled Java code for this assignment, compress the .java file into a single .zip file.

TASK 3

Using jGrasp and the Software Development Kit, write a program in response to the following prompt:

Write a program that prompts the user to enter the mass of a person in kilograms and outputs the equivalent weight in pounds. Output both the mass and the weight rounded to two decimal places. (Note that for standard Earth gravity, 1 kilogram = 2.2 pounds.) Format your output with two decimal places.

Your answer should use dialog boxes for the input/output statements.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that prompts the user to input a decimal
Reference No:- TGS01723577

Now Priced at $40 (50% Discount)

Recommended (95%)

Rated (4.7/5)