This project shows usage of template method pattern.
The main principle is to let subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
In template method pattern we create an abstract class defining operations with a template method set to be final so that it cannot be overridden. Concrete classes extend the abstract class and override its methods.
Project is created with:
- Java
IDE: Intellij IDEA 2018
To run this project, you need to have jdk
and jre
installed.
Download the src
folder and open it in a command prompt
or terminal
.
Type javac Test.java
and press enter to compile.
Type java Test
to run program.
This project was created with the help of https://www.tutorialspoint.com website.