The Comment Class
Explore how to enhance a social media app by adding a Comment class that supports dialogue on posts. Understand composition and encapsulation by linking comments to users and posts, and learn to extend functionality for threaded replies.
Chirpy is coming together nicely. So far, users have created posts and liked them. Let’s see the list of tasks that Chirpy can do so far!
Add a user.
Post a chirp.
Like a chirp.
But what about the conversation that follows a chirp?
Social media isn’t just about posting and liking—it’s about dialogue.
Today, we’ll add that conversational element by introducing a Comment class. ...