Question: JAVA language please!!! and please add comments for explaination. Operations You will need to implement five distinct operations. For each, you will need to accept
JAVA language please!!! and please add comments for explaination.
Operations
You will need to implement five distinct operations. For each, you will need to accept input values until the user enters "0". When the user enters an input of "0", we will consider it as an indicator that no additional operations should be performed. For example, given a series of inputs "1", "2", "3", and "0", operations would be performed on "1", "2", and "3". Be careful not to include the "0" in your calculations.
ADDITION
Add each of the inputs. For example, the series of inputs "5", "4", "2", and "0" would result in "11".
SUBTRACTION
Subtract each of the inputs. For example, the series of inputs "12", "7", "1", "1", and "0" would result in "3".
MULTIPLICATION
Multiply each of the inputs. For example, the series of inputs "2", "2", and "0" would result in "4".
DIVISION
Divide each of the inputs. For example, the series of inputs "100", "5", "2", and "0" would result in "10".
FACTORIAL
This operation is slightly different than the others. Rather than printing a single result, you'll be printing the factorial of each number the user enters. For example, the series of inputs "3", "7", and "0" would result in first "6" and then "5040".

sample outputs:

MENU The full menu is included below: Calculator 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Factorial 6. Quit Enter your selection: CALCULATION INTERFACES Addition Enter each integer you would like added: [1] [2] [3] [@] The sum of all these numbers is 6. Subtraction Enter each integer you would like subtracted: [10] [1] [1] [@] The difference of all these numbers is 8. Multiplication Enter each integer you would like multiplied: [18] [5] [3] [8] The product of all these numbers is 158. Division Enter each integer you would like divided: [30] [2] [5] [@] The quotient of all these numbers is 3. Factorial Enter each integer you would like the factorial of: [41 The factorial of 4 is 24. [8] The factorial of 8 is 40320. [@] Calculator 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Factorial 6. Quit Enter your selection: [2] Enter each integer you would like subtracted: [10] [3] [@] The difference of all these numbers is 7. Calculator 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Factorial 6. Quit Enter your selection: [5] Enter each integer you would like the factorial of: [3] The factorial of 3 is 6. [9] The factorial of 9 is 362880. [@] Calculator 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Factorial 6. Quit Enter your selection: [6] Ending Calculator... Calculator 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Factorial 6. Quit Enter your selection: [6] Ending Calculator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
