Question: remove _ friend: This function takes a username, password, friend _ username, and social network as input and removes a friendship between the two users.

remove_friend:This function takes a username, password, friend_username, 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 authenticate_user method before modifying the input social network dictionary. If the authentication fails this method should return the error code ERROR_FAILED_AUTHENTICATION. This function should also check if friend_username is in the usernames friend list, and return the error code ERROR_FRIEND_NOT_FOUND 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!