stock_listing To detect the type of transaction used Factory design pattern. To apply appropriate transformation used strategy design pattern