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
Step: 1
Heres a Java program that follows the requirements youve mentioned It accepts a process number and t...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started