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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education