Scoring: Requirement Max score 30 Constructors, addMember, removeMember, contain
ID: 3877549 • Letter: S
Question
Scoring: Requirement Max score 30 Constructors, addMember, removeMember, containsMember, makePals, endPals, arePals, getMemberCount 15 10 10 getMembers, getPals, toString getPalsOfPals, commonPals degreesOfSeparation, areConnected, membersWithDegree Handle edge cases, making sure that your methods5 behave correctly when (for example), you try to add a member to a full network, or you try to removea member that doesn't exist, or you try to make two people pals but one of them isn't a member. Use Javadoc comments to document the PalBook class, constructors, and methods. If you've never written Javadoc comments before, here is an 8- minute tutorial created by Norm Krumpe to help you understand https://www.youtube.com/watch?v-6XoVf4x-tag Deductions may be made for programming that is not consistent with general standards of good programming as learned in CSE 174 and 271. This includes methods that are too long, logic that should be cleaned up, poor formatting of code, and so onExplanation / Answer
Here is the explanation of degreeofsepration(), you asked for:
In function degreeOfSeparation() it takes two string argunment and it will return an int value .
As given in degreeofSeparation():
In function if two people have same friend so degree of separation will be 2 and if they don’t have same friend so degree will be -1 and if both are friend so degree will be 1 and if both are name of same person so degree will be 0
And at end of function it will return degree of seperation
I hope this solves your problem
Comment if you have any problem in above code
And please give it a thumbs up if it solved your problem :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.