Object Oriented Desgin - gaming app
Anonymous User
243
Feb 06, 2021
Feb 06, 2021

For example, below is one screen in a gaming app, which shows the achievements of a user. It includes the achievements a user already got and the achievements he/she can attain further.

The design requirement is that, once the product is shipped out, if we ever want to add new achievments to the game, it should be done with minimal or no code changes at all. How to design classes? or what design patterns to use etc?

Basically the idea is system must be expandable. What OO design pattern to use?

/*
+------------------+---+
|Just Started!     | √ |
|  Must Do:        +---+
|    Get 1 Gold        |
|    Reach Level 2     |
|  Rewards:            |
|    Earn 400 coins    |
+------------------+---+
|Leveling Up!      |   |
|  Must Do:        +---+
|    Get 2 Emerald     |
|    Reach Level 3     |
|  Rewards:            |
|    Earn 800 coins    |
+------------------+---+
|Mining Expert!    |   |
|  Must Do:        +---+
|    Have 10000 coins  |
|  Rewards:            |
|    Earn 1 Diamond    |
|    Increase 1 Level  |
+------------------+---+
| ...              |   |
\/\/\/\/\/\/\/\/\/\/\/\/
*/
Comments (2)