Professional Documents
Culture Documents
ConcreteFlyweight
This is a class that Inherits from the Flyweight class.
UnsharedFlyweight
This is a class that Inherits from the Flyweight class and enables sharing of
information, it is possible to create instances of concrete flyweight classes that
are not shared.
FlyweightFactory
This is a class that holds the references of already created flyweight objects.
When the GetFlyweight method is called from client code, these references are
checked to determine if an appropriate flyweight object is already present or
not. If present, it is returned. Otherwise, a new object is generated, added to
the collection and returned.
1.ShapeObjectFactory- FlyweightFactory class.
2.IShape - Flyweight interface.
3.Circle & Rectangle - ConcreteFlyweight class.