Question: Question 1 Simple Java Type Calculations. Write a complete Java program that will do the following: 1 . Displaysawelcomemessage. 2 . Then prompts the user

Question 1 Simple Java Type Calculations. Write a complete Java program that will do the following: 1. Displaysawelcomemessage. 2. Then prompts the user to enter the following: Two integer values which are stored in two variables of type int. Two double values which are stored in two variables of type double. We assume that all the input that is entered by the user is perfect and valid. No validation for the input is needed for this assignment. 3. The program should declare a third integer variable and initialize its value to the value of the first integer divided by the value of the second integer. 4. The program should display the following message: The result of int1_Value / in2_Value is int3_Value int1_Value, int2_Value and int3_Value are replaced by their real values. 5. The program should declare a third double variable and initialize its value to the value of the first double divided by the value of the second double. 6. The program should display the following message: The result of double1_Value / double2_Value is double3_Value Double1_Value, double2_Value and double3_Value are replaced by their real values. 7. Now the program should assign the third double to the value of the first integer divided by the second double and then displays the following message: The result of int1_Value / double2_Value is double3_Value Int1_Value, double2_Value and double3_Value are replaced by their real values 8. Now the program should assign the third integer to the value of the first integer modulus the value of the second integer and then displays the following message: The result of int1_Value % in2_Value is int3_Value int1_Value, int2_Value and int3_Value are replaced by their real values. 9. Finally,theprogramshouldassignthethirdintegertothevalueofthefirstdouble divided by the second double and then displays the following message: The result of double1_Value / double2_Value is int3_Value Int1_Value, double2_Value and double3_Value are replaced by their real values. You should notice that type casting is needed here. 10.Displays a closing message. Comp248/AA-Summer 2024 Assignment 1 Page 211.You need to repeat the program three times with different set of input in each run and note your observation about the result in each run.

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!