All Questions
Tagged with template-method object-oriented-design
3 questions
2
votes
0
answers
121
views
Access modifiers in combination of interpreter pattern with template method pattern
Motivation: (Skip to "The Problem" if you don't need motivation for it)
As a project for myself, I'm writing an expression parser for certain kinds of mathematical expressions, and I'm using the ...
12
votes
4
answers
9k
views
"Factory Method is a specialization of Template Method". How?
Similarities and differences between the two:
Template Method
Relies on inheritance.
Defines the steps of an algorithm, and leaves the task of implementing them to subclasses.
Factory Method
Relies ...
1
vote
2
answers
246
views
Processing and sending processed data to super from child class constructor
I want to do some initialization in child class constructor and pass result to super().
But Java doesn't allow any processing in child class constructor before super() call.
Whats a good way to ...