Answer:
Following are the Declaration of instance variable which is mention above .
protected String messageUponExiting; // variable declaration
Step-by-step explanation:
Here we declared a variable "messageUponExiting " as string type.The String datatype parameter will hold the string value .We can use Protected access modifier because as mention in the question the variable must be accessible in all of the subclass of windows.
Syntax of declaring any instance variable .
Access-modifier datatype variable-name;