Wow! Literally overnight, your <INSERT APPLICATION NAME> app has really taken off! You decide to add a new feature to your app: posts.
In order to gain this new functionality, you'll have to modify your original User
class.
- Add a method to your
User
class that allows for creating a new user post. - Add any necessary instance properties to make step 1 work. What data structure should you use?
- Add a class variable that stores the posts from every user. What data structure should you use?
- Make sure that the the information stays in sync!
Add a method that allows for deleting a post. Again, make sure that your information stays in sync.