i’m planning to build a comment system, but don’t know how to go about it. I have the following thought out.
-
there will be users and comments class
-
There will be three categories of users; normal users, moderators and admins. All will have varying level of privileges. This users class will have a single property; name.
-
There will also be a method that will get comments belonging a particular name
a. The comment argument in the above method will be the message property in the comment class -
The comment class class will have three properties; author, message and repliedTo (if comment is a reply to another comment).
a. the author in the comment class will be the name property in the user class.
My question is How do I make these two classes communicate with each other?