Added a* algorithm implementation as an abstract class.