# This program will add three in

1. This program will add three integers that the user inputs. The first value must be between 0 and 50. The second value must be between 51 and 100. The third value must be greater than 100.

2. Your program should use try/catch blocks and loops to protect against input mismatches and to get a value within the above ranges.

3. You MUST use custom exceptions for the input range. I know this could also be accomplished using if/else statements, but I want you to use try/catches for this.

4. You MUST obtain each number from the user one at a time and make sure it is acceptable before moving on. This may require the use of THREE loops, each with its own request for input and try/catch blocks.

5. Once you have three good values, print the sum of them to the screen.

6. You will receive no credit if you make the user input all three numbers multiple times. (See Incorrect Samples)

CORRECT SAMPLE OUTPUT: (Notice how we do not move on from an input until we get something acceptable.)

This program will add three numbers. .

Please enter number 1 (between 0 and 50):

>>>-4

Invalid input. Number must be between 0 and 50.

Please enter number 1 (between 0 and 50:

>>>10

Please enter number 2 (between 51 and 100):

>>>nine

Must be an integer.

Please enter number 2 (between 51 and 100:

>>>60

Please enter number 3 (greater than 100):

>>>2.4

Must be an integer.

Please enter number 3 (greater than 100):

>>>200

The sum is 270.

Goodbye.

INCORRECT SAMPLE OUTPUT: (This does not tell us where the problem is and requires us to enter all three numbers in again.)

This program will add three numbers. The first must be between 0 and 50. The second between 51 and 100. The third greater than 101.

>>>7

>>>6

>>>2.5

Invalid input.

Etc.

INCORRECT SAMPLE OUTPUT: (This has us enter one value at a time, but doesn’t catch the error immediately. When there’s an error, it makes us start over.)

This program will add three numbers. The first must be between 0 and 50. The second between 51 and 100. The third greater than 101.

>>>1

>>>6

>>>2.5

Invalid Input.

Etc…

with JAVA

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.