class Window{ protected WindowManager windowManager; public Window() { windowManager = new WindowManager(); } public virtual void DrawWindow() { }}
using System;class LockscreenWindow : Window{ private PasswordManager passwordManager; public override void DrawWindow() { passwordManager = new(); Console.Write("Enter Password: "); string password = Console.ReadLine(); if(password == passwordManager.GetPassword()) { Console.WriteLine("Password correct"); windowManager.SwitchWindow(WindowManager.WindowName.Homescreen); }else { Console.WriteLine("Password Incorrect"); } }}