created instance of new teacher and successfully called greeting method on it.