AdderAA.java This program will allow the user to select how many numbers they’d like to add together, and then enter those numbers to be totaled. The program should run in a continuous loop unless the user enters zero at the menu (in this case the program should end). A negative menu answer should give an “invalid response.” Your code should catch input mismatches. There will be multiple loops and probably an if/else structure required to accomplish this. You cannot use a break statement or any other non-logical way such as System.exit to exit a loop. This will result in a loss of major points. The example below is one continuous run of the program. Your program should run the test case exactly as it appears below, and should work on any other case in general. Output Example This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program. >>>3 Enter your number: 4.0 Enter your number: 3.2 Enter your number: -1.0 The sum of your numbers is 6.2. This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program. >>>-20 Invalid response. This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program. >>>2 Enter your number: 1.5 Enter your number: 34.5 The sum of your numbers is 36.0. This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program. >>>0 Goodbye. in java
AdderAA.java
This
Your program should run the test case exactly as it appears below, and should work on any other case in general.
Output Example
This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program.
>>>3
Enter your number: 4.0
Enter your number: 3.2
Enter your number: -1.0
The sum of your numbers is 6.2.
This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program.
>>>-20
Invalid response.
This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program.
>>>2
Enter your number: 1.5
Enter your number: 34.5
The sum of your numbers is 36.0.
This program will add numbers together. Tell me how many numbers you’d like to add or type 0 to end the program.
>>>0
Goodbye.
in java
Step by step
Solved in 3 steps with 1 images