Week 6 java assignment | Computer Science homework help

Week 6 Assignment

Need the following java program

Test Cases (5 points): Create a list of test cases for each assigned exercise. Refer to Developing Test Cases in the Getting Started Module for instructions on how to develop a full set of test cases.

Exception handling should be used on all numeric input.

Exercise 1. (15 points): The Café Noir Coffee Shop wants some market research on its customers. When a customer places an order, a clerk asks for the customer’s zip code (US zip codes only) and age. The clerk enters that data was well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day.
• When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (less than 10 or more than 110), the program reprompts the clerk continuously.

• When the clerk enters less than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value on the third attempt, the program accepts the high value, but if the clerk enters a negative value on the third attempt, an error message is displayed and the order is not counted.

At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (54984), and a count from other zip codes. Also display the average customer age as well as counts of the number of items ordered by customers under 30 and by customers 30 and older.

Exercise 2. (10 points): Write a program that contains public methods named
add(),
subtract(),
multiply(),
and divide().
Each of the methods accepts two numeric arguments and returns a number that represents the result of the appropriate arithmetic operation. Design a main() method that prompts the user for two numbers, tries each of the methods, and displays the results of each arithmetic operation.

Place your order
(550 words)

Approximate price: $22

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:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
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.

Read more

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.

Read more

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.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more