Write java program that generate two integer random numbers between 15 and 43 and print out the result of four operations between the two numbers, addition, subtraction, multiplication, division. The program must have the following methods: 1- Method to generate a random number and return it. 2- Method for addition operation accept two numbers and return back the result of addition operation. 3- Method for subtraction operation accept two numbers and rețurn back the result of subtraction operation. 4- Method for multiplication operation accept two numbers and return back the result of multiplication operation. 5- Method for division operation accept two numbers and return back the result of division operation. 6- Method to display the operation result which accept a string and three numbers. 7- Main method to run the program by calling the above methods.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 14E
icon
Related questions
Question
Write java program that generate two integer random numbers between 15 and 43 and print
out the result of four operations between the two numbers, addition, subtraction,
multiplication, division.
The program must have the following methods:
1- Method to generate a random number and return it.
2- Method for addition operation accept two numbers and return back the result of
addition operation.
3- Method for subtraction operation accept two numbers and rețurn back the result of
subtraction operation.
4- Method for multiplication operation accept two numbers and return back the result of
multiplication operation.
5- Method for division operation accept two numbers and return back the result of division
operation.
6- Method to display the operation result which accept a string and three numbers.
7- Main method to run the program by calling the above methods.
bmission instructions:
Transcribed Image Text:Write java program that generate two integer random numbers between 15 and 43 and print out the result of four operations between the two numbers, addition, subtraction, multiplication, division. The program must have the following methods: 1- Method to generate a random number and return it. 2- Method for addition operation accept two numbers and return back the result of addition operation. 3- Method for subtraction operation accept two numbers and rețurn back the result of subtraction operation. 4- Method for multiplication operation accept two numbers and return back the result of multiplication operation. 5- Method for division operation accept two numbers and return back the result of division operation. 6- Method to display the operation result which accept a string and three numbers. 7- Main method to run the program by calling the above methods. bmission instructions:
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT