Q.1.What do the letters AWT stand for?A.1.AWT stands for Abstract Windowing Toolkit and it a portion of the Java library.Q.2.Explain the relationship between the various parts in the manipulation of alayout manager.A.2. In the manipulation of the layout manager there are three differentmechanisms: inheritance, composition and implementation of an interface.Inheritance links the application clas to the parent window class. This allows thecode written in the AWT class to perform application specific actions by invokingmethods in the application class that override methods in the parent class. The factthat composition is used to link the container with the layout manager makes thelink between these two items very flexible and dynamic-the programmer can easilychange the type of layout manager being used by a container. Finally the fact thatthe layout manager is an interface means that the programmer is free to developalternative layout managers instead of extending this class every time.Q.3.What is a listener? When does a listener get invoked?A.3.A listener is an object whose sole purpose is to sit and wait for an event tooccur. When an event occurs, the listeners are notified, and they take theappropriate action.Q.4.What purpose is being addressed by the mouse adapter?A.4.
More often than not, programmers are interested in only one or two eventsthat a mouse does (like a mouse click, mouse enter, mouse exit, mouse press,mouse release etc.) not all the possible events defined by the interface. The mouse adapter provides empty implementations, allowing the programmer toredefine only the events of interest.
Q.1.How are object connections related to name visibility?A.1.Visibility describes the characterization of names-the handles by which objectsare accessed. An object is visible in a certain context if its name is legal anddenotes the object.Q.2.What does the term coupling mean?