In Monte Carlo Framework, the path generator is specified with Black-Scholes. For path pricer, it fetches the logS from the input stream, calculates the payoff based on above formula and discounts it to time 0 for option price.