+4

How do you demonstrate OOP principles in Python or Javascript with a prototype or mockup blog with a comment section?

Here is the link to both the starter code and the rules: https://code.sololearn.com/c4VebGPZ2LhF/#py And below is a summary of the rules of the code in the link: How do I code the a blog mock-up in Python/JavaScript based on the following set of rules: 1) Normal users can only create new comments, and edit their own comments. 2) User/Moderator/Admin defaults: Should be marked as not logged in. Should return None for the last logged in at property. 3) Moderator is a User. 4) Moderators can only edit their own comments. 5) Moderators can delete any comments. 6) Admin is both a User and a Moderator can edit any comments. 7) Admins can delete any comments. 8) Moderators have the added ability to delete comments (to remove trolls). 9) Admins have the ability to edit or delete any comment 10)Comments are simply a message, a timestamp, and the author. 11)Comments can also be a reply, so we'll store what the parent comment was. 12)Comment defaults: Should set the current timestamp for the created at property upon instantiation. Replied To is optional, and should be None if not provided. 13)Composition: (a)Comments contain a reference to the User who created it (author) (b)Comments optionally contain a reference to another comment (replied_to) When converting to a string (to_string), the following format is used: No replied to: message + " by " + author.name With replied to: message + " by " + author.name + " (replied to " + repliedTo.author.name + ")"

4/22/2019 11:03:34 AM

Jude

1 Answer

New Answer