Test Case 5 Enter five names \n Enter friend 1\n Jobs ENTER Enter friend 2 \n Gates ENTER Enter friend 3 \n Zuckerberg ENTER Enter friend 4 \n Ford ENTER Enter friend 5 \n Musk ENTER Here are all of those names \n Friend 1 is Jobs \n Friend 2 is Gates \n Friend 3 is Zuckerberg \n Friend 4 is Ford \n Friend 5 is Musk \n Which friend is your best friend? (Enter an integer) In 3 ENTER Zuckerberg? Yes, Zuckerberg is awesome \n

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Modify the previous program. Show the user a list of the names (with integers before each name). Allow the user to select which friend is his/her best friend.

### Test Case 5

This test case illustrates a simple input-output interaction for entering and selecting names.

1. **Input Instructions:**
   - You'll be prompted to enter five names, one for each "friend."

2. **Steps:**
   - `Enter friend 1`: Input the name. (Example: Jobs)
   - `Enter friend 2`: Input the name. (Example: Gates)
   - `Enter friend 3`: Input the name. (Example: Zuckerberg)
   - `Enter friend 4`: Input the name. (Example: Ford)
   - `Enter friend 5`: Input the name. (Example: Musk)

3. **Output:**
   - The program will list all the names:
     - Friend 1 is Jobs
     - Friend 2 is Gates
     - Friend 3 is Zuckerberg
     - Friend 4 is Ford
     - Friend 5 is Musk

4. **Selection Query:**
   - You will be asked: "Which friend is your best friend? (Enter an integer)"
   - Example response: Enter the number corresponding to the preferred friend (e.g., 3 for Zuckerberg).

5. **Result:**
   - The program affirms the selection, e.g., "Zuckerberg? Yes, Zuckerberg is awesome" if you chose 3.

This test case demonstrates how to capture input, associate it with numbered outputs, and handle user choice based on prior input.
Transcribed Image Text:### Test Case 5 This test case illustrates a simple input-output interaction for entering and selecting names. 1. **Input Instructions:** - You'll be prompted to enter five names, one for each "friend." 2. **Steps:** - `Enter friend 1`: Input the name. (Example: Jobs) - `Enter friend 2`: Input the name. (Example: Gates) - `Enter friend 3`: Input the name. (Example: Zuckerberg) - `Enter friend 4`: Input the name. (Example: Ford) - `Enter friend 5`: Input the name. (Example: Musk) 3. **Output:** - The program will list all the names: - Friend 1 is Jobs - Friend 2 is Gates - Friend 3 is Zuckerberg - Friend 4 is Ford - Friend 5 is Musk 4. **Selection Query:** - You will be asked: "Which friend is your best friend? (Enter an integer)" - Example response: Enter the number corresponding to the preferred friend (e.g., 3 for Zuckerberg). 5. **Result:** - The program affirms the selection, e.g., "Zuckerberg? Yes, Zuckerberg is awesome" if you chose 3. This test case demonstrates how to capture input, associate it with numbered outputs, and handle user choice based on prior input.
Expert Solution
Problem Analysis:

The problem is based on the basics of map data structure in programming language.

NOTE: The solution is in C++ programming language as no language was mentioned in the question.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY