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.

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.