K
K
Konstantin2020-02-07 10:18:09
OOP
Konstantin, 2020-02-07 10:18:09

What pattern to use to create objects of the same type?

What pattern should be used to create objects of the same type, but with different implementations?
Different implementation of abstract methods inside and constructor.

For example, there is a button class, based on this class, buttons with a different implementation can be created.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2020-02-07
@Junart1

The Abstract Factory pattern is most likely to suit you . The link, by the way, has examples about buttons)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question