Question: In a social networking service, a user has friends, the friends have other friends, and so on. We are interested in knowing how many people
In a social networking service, a user has friends, the friends have other friends, and so on. We are interested in knowing how many people can be reached from a person by following a given number of friendship relations. This number is called the “degree of separation”: one for friends, two for friends of friends, and so on. Because we do not have the data from an actual social network, we will simply use an average of the number of friends per user. Write a recursive method public static double reachablePeople(int degree, double averageFriendsPerUser) Use that method in a program that prompts the user for the desired degree and average, and then prints the number of reachable people. This number should include the original user.

Mage in Linedn Tete Faobonk ooge M Intren
Step by Step Solution
3.43 Rating (178 Votes )
There are 3 Steps involved in it
Heres an implementation in Java import javautilScanner public class DegreeOfSeparation public static ... View full answer
Get step-by-step solutions from verified subject matter experts
