Question: remove _ friend: This function takes a username, password, friend _ username, and social network as input and removes a friendship between the two users.
removefriend:This function takes a username, password, friendusername, and social network as input and removes a friendship between the two users. This means that the function mutates the original dictionary so each user is removed from each others friend list in the input social network dictionary. This function should authenticate the user using the authenticateuser method before modifying the input social network dictionary. If the authentication fails this method should return the error code ERRORFAILEDAUTHENTICATION. This function should also check if friendusername is in the usernames friend list, and return the error code ERRORFRIENDNOTFOUND if not. If the operation is successful this method should return nothing.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
