Question: Write a Java program to accept process number and two integer values from user. Than program will check process number, class class If process number

Write a Java program to accept process number and two integer values from user. Than program will check process number, class class 

If process number is equal to 1 than program will run "addition" 

If process number is equal to 2 than program will run "subtraction" 

If process number is equal to 3 than program will run "multiplication" class 

If process number is equal to 4 than program will run "division" class 

Each class will accept 2 integer values from main program, than will make related process and will print the result. 

Note : if entered process number is different than I to 4 than program will give an error message to enter value between 1 and 4, and if any negative value is entered than program will exit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program that follows the requirements youve mentioned It accepts a process number and t... View full answer

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 Computer Engineering Questions!