Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Week 11-Dictionaries/Sets Skills needed to complete this Lab - Use sets . Reading a text file Download the input le from canvas -friends.txt Social

image text in transcribed
image text in transcribed
Lab Week 11-Dictionaries/Sets Skills needed to complete this Lab - Use sets . Reading a text file Download the input le from canvas -friends.txt Social Network People have friends and connections on social media sites. Many times those site show us things for friends of friends who we arent directly connected to. You are given a text file Cfriends tu) that contains rows of people who are connected as friends. Each line has 2 names separated by a space. For instance, line 1, is "Alice Bob" Which means alice is a friend of bob and bob is a friend of alice The input file may contain different values You can't assume you will have Alice, Bob, Carol, Edward, Daniel and Fran. You'll want a data structure to track all the friends and each one will have its own data structure for what friends they have Sample Output Social Network I. Find all friends shared by 2 people D. Find all friends of X, that person Y does not have S. Find all friends that X and Y have, but do not share with each other Q. Quit Enter a valid person--> Alex Alex is not part of this network, enter another name. Enter a valid person>Alice Enter a valid person => Fran Alice and Fran share these people Carol Bob Social Network I. Find all friends shared by 2 people D. Find all friends of X, that person Y does not have S. Find all friends that X and Y have, but do not share with each other Q. Quit Alice Enter a valid person Lab Week 11-Dictionaries/Sets Skills needed to complete this Lab - Use sets . Reading a text file Download the input le from canvas -friends.txt Social Network People have friends and connections on social media sites. Many times those site show us things for friends of friends who we arent directly connected to. You are given a text file Cfriends tu) that contains rows of people who are connected as friends. Each line has 2 names separated by a space. For instance, line 1, is "Alice Bob" Which means alice is a friend of bob and bob is a friend of alice The input file may contain different values You can't assume you will have Alice, Bob, Carol, Edward, Daniel and Fran. You'll want a data structure to track all the friends and each one will have its own data structure for what friends they have Sample Output Social Network I. Find all friends shared by 2 people D. Find all friends of X, that person Y does not have S. Find all friends that X and Y have, but do not share with each other Q. Quit Enter a valid person--> Alex Alex is not part of this network, enter another name. Enter a valid person>Alice Enter a valid person => Fran Alice and Fran share these people Carol Bob Social Network I. Find all friends shared by 2 people D. Find all friends of X, that person Y does not have S. Find all friends that X and Y have, but do not share with each other Q. Quit Alice Enter a valid person

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions