MCS-177 Project 10: Facebook

Start: Monday 12/09; Due: Friday 12/13, by the beginning of class


Overview

In this project, you will continue to experiment with building your own Python classes. Many of you log into Facebook and interact with your friends. You will build classes to represent a text-version of Facebook.

This project is out of 20 points and offers up to 7 extra credit points once the project is complete. You can skip anything shown in blue and come back to finish it later for more credits.

We stongly encourage you to work on this project with a partner.

Example

Here is an example of how all the classes come together to make our Facebook work. This output reflects implementation of all the extra credit features.

Specific tasks

  1. Implement the Comment class in comment.py such that:

  2. Implement the Status class in status.py such that:

  3. Implement the User class in user.py such that:

  4. Implement the Facebook class in facebook.py such that:

Note

Submitting your work

You will be submitting your code using Moodle; click on the following link for instructions on submitting code using Moodle. For this project, you will need to submit the following files:

Grading

You will earn one point for each of the following accomplishments: (Project 10 is still out of 20 points. In other words, you may earn up to 7 points of extra credits in this project.)

  1. You have all the instance variables necessary for the Comment class.
  2. You have all the accessor and mutator methods for all the instance variables in the Comment class.
  3. The mutator methods in the Comment class accept only valid values and prints an error message for invalid values.
  4. The __str__ method in the Comment formats the code correctly.
  5. You have all the instance variables necessary for the Status class.
  6. You have all the accessor and mutator methods for all the instance variables in the Status class.
  7. The mutator methods in the Status class accept only valid values and prints an error message for invalid values.
  8. The __str__ method in the Status class formats the code correctly.
  9. The addLike and addComment methods are implemented correctly.
  10. You have all the instance variables necessary for the User class.
  11. You have all the accessor and mutator methods for all the instance variables in the User class.
  12. The mutator methods in the User class accept only valid values and prints an error message for invalid values.
  13. The __str__ method in the User class formats the code correctly.
  14. The addFriend method links two users as friends correctly in the User class.
  15. The isFriend method checks if the given user is a friend or not correctly.
  16. You have all the instance variables necessary for the Facebook class.
  17. The registerUser method adds a new user to Facebook correctly.
  18. The login and logout methods log in and out a user correctly and prints out an error message when appropriate.
  19. The addFriend method correctly links two users as friends in the Facebook class.
  20. The viewProfile method displays the information about the current user correctly.
  21. The viewStatus method displays only the status of the currently logged-in user and his/her friends.
  22. The viewStatus method formats the statuses correctly and prints out an error message when appropriate.
  23. The postStatus method adds a new post by the user correctly. It prints out an error message when appropriate.
  24. The likeStatus and commentOnStatus methods behave correctly. They print out an error message when appropriate.
  25. Your code is not unnecessarily complex.
  26. The __str__ method of the status class uses the grammatically correct format.
  27. The __str__ method of the user class uses the grammatically correct format.