Intrinsic and extrinsic

Report a typo

Imagine you are writing a fantasy RPG game and want to refactor the Potion class using the Flyweight pattern:

class Potion {
    String description;
    int price;
}

It has two fields: description that contains information about its effect, which is the same for a specific type of potion and price that represents the price of a concrete potion in a concrete alchemy shop (and there are many alchemy shops in the game). Choose which field represents the intrinsic or extrinsic state of the Potion object.

Select one option from the list
___

Create a free account to access the full topic