Question: Please do the following Program in Java Programming Language: Net Promoter Score (NPS) is one way to determine if customers are satisfied with a product

Please do the following Program in Java Programming Language:

Net Promoter Score (NPS) is one way to determine if customers are satisfied with a product or service. You've probably seen questions like this: "On a scale from 0 to 10, how likely is it that you would recommend our product to a friend or colleague? " Believe it or not, the majority of companies now use this simple question to compute the net promoter score and use it as a key metric.

In this question, you will implement a text-based survey that asks the user to answer this question about a product. Continue to ask the question until the user enters an integer score between 0 and 10. Depending on the score, you will respond in different ways.

Promoters (Scores of 9-10): Ask the customer to consider leaving a review.

Passives (Scores of 7-8): Ask the customer for feedback on how to improve.

Detractors with higher scores (Scores of 4-6): Apologize, then ask the customer for feedback on how to improve.

Detractors with lower scores (Scores of 0-3): Apologize, then offer to transfer the customer to a support representative.

If they say "yes": Tell them they will be connected.

If they say "no": Tell them you hope they will give you another chance.

If they say anything else: Tell them you will get them to someone who will help.

To implement the solution, you are required to use two switch statements.

The first switch statement should change the behavior of the program based on the score the user inputs between 0 and 10.

The second switch statement should change the behavior of the program based on whether the user wishes to be routed to a support representative, which only applies for scores of 0-3.

Cases with the same behavior should not duplicate the code. Use multiple case labels in a row instead.

Scores of 4-6 and 7-8 must share the same logic for asking for feedback, which you should accomplish by "falling through" from one case to another.

In general, you should avoid duplicating the same code in multiple places. If you have to write the same line multiple times, try restructuring the code to reduce duplication.

Be sure to match the expected format and pass all the test cases. Don't forget to use good style in your solution and add implementation comments where appropriate.

Example input/output:

On a scale from 0 (not at all likely) to 10 (very likely), how likely are you to recommend this product to a friend or family member? 2 We're sorry to hear you are so dissatisfied. We would like to learn more about your experience so we can improve. May we transfer you to a support representative? [yes/no] yes Great, you will be connected to a representative momentarily. Thanks for being our customer. Have a nice day!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!