// mybridgeusing system;
/ / -------------------------------------------------------------------------------------------- -Class Manager // Parent ClassAbstract Class Manager {// Method: Kickout Abstract Public Void Kickout ();
// sonclass1: FemaleManagerclass FemaleManager: Manager {override public void KickOut () {Console.WriteLine;} ( "Please Go Out!")}; // sonclass2: MaleManagerclass MaleManager: Manager {override public void KickOut () {Console.WriteLine ("OUT! Shit!");}}; // ------------------------------------ ------------- Class Manager // ------------------------------- ---------------- Class Chatroomclass Chatroom {// Manager to Keep The Room Silent: Field Private Manager Chatroommanager;
// Property public manager chatroommanager {set {chatroommanager = value;}}
//Method public void kickout () {chatroommanager.kickout ();}}; // -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------- ---------------------- Testappclass testapp {public static void main (string [] args) {chatroom chatomManager = new femaleManager (); Chatroom.kickout ();
Chatroom.chatroommanager = new malemanager (); chatroom.kickout ();
While (TRUE);
/ / -------------------------------------------------------------------------------------------- -TestApp