implemented Window class