Create a person class that contains the username password


Python Program Help

Read in an input file (socialmedia.txt)

1)sherlock, irene, messages, Elementary my dear Watson, 221B Baker Street, friends, watson, lestrade,

2)watson, mary, messages, I'm ready, I can't afford to jeopardise my medical career, friends, sherlock, mary, lestrade,

3)lestrade, theyard, messages, I'm stuck, Scotland Yard, friends, watson, sherlock,

4)mary, watson, messages, I'm amazing, The Baker Street boys, Rot in Hell, friends, sherlock, watson,

5)mrs. hudson, ferrari, messages, You have a visitor, Now Now Sherlock!, friends, sherlock,

6)mycroft, england, messages, Elementary, The winds of change are coming, friends, sherlock, watson, mary, lestrade, mrs. hudson,

7)eurus, redbeard, messages, The east wind is coming, friends, sherlock, mycroft,

The sample file contains information about one user per line. The first entry in a line is the username, the second entry is the password, the subsequent entries are their status update/messages, followed by their friends.

Create a Person class (person.py) that contains the username, password, list of status updates, and list of friends. Write all the appropriate methods for the class.

Ask the user for their username and password. If the user is authenticated (user entered password matches the expected password), then display the following menu to the user.

1) Print all my friends

2) Print all my messages/status updates

3) Post a message/status update

4) Print all my friends' messages/status updates

5) Add a friend

6) Logout (Change user)- Ask the user for another username and password and authenticate them. Once authenticated, show them this menu.

7) Exit- Before exiting the program, write out the current status of the social network to the file (socialmedia.txt). Make sure that you write it out in the same format so it contains the updates to the social network when you restart the program.

Attachment:- socialmedia.rar

Solution Preview :

Prepared by a verified Expert
Python Programming: Create a person class that contains the username password
Reference No:- TGS02595342

Now Priced at $25 (50% Discount)

Recommended (90%)

Rated (4.3/5)