Question: Create a Java program that performs the following tasks: Build a Calculator. First, the program asks the user to enter one operation ( Addition or

Create a Java program that performs the following tasks: Build a Calculator. First, the program asks the user to enter one operation (Addition or Multiplication or Division or Subtraction). Check the operation entered by the user using a (Switch) In the case the user enters (Addition), the program will ask the user to enter how many numbers to add. The user chooses n numbers and the program will create an array of size n, and ask the user to enter the n numbers. After that, the program will display the addition of all the array elements entered by the user. (Loop is used in this part). In the case the user enters (Multiplication) the program will ask the user to enter two numbers and display the multiplication of the two numbers. In the case the user enters (Division), the program will ask the user to enter two numbers and display the division of the two numbers. In the case the user enters (Subtraction), the program will ask the user to enter two numbers and display the subtraction of the two numbers. All the operations are done using Methods. Print your name in the output.

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 Programming Questions!