Your User
class should have several attributes and methods at this point. That's great as a general purpose representation of a user. However, as time has passed, your application's requirements have changed. You want to start making money off your app's popularity, so you've created a two-tiered system: premium users and free users.
Feel free to either start from scratch or use your (or someone else's) User
class from the previous challenge.
- Your
User
class will now become a base class. - Create two subclasses
PremiumUser
andFreeUser
that will inherit fromUser
. - Override the
add_post
method forFreeUser
so that an instance ofFreeUser
is only able to make two posts. - In the
runner.py
file, importFreeUser
andPremiumUser
and create at least one instance of each. - Add tests.