COMP 328 Final Guide COMP 328 Final Guide | Page 7

22 : The logical relationship between radio buttons is maintained by objects of what class ? a . MutualExclusionGroup b . RadioButtonGroup c . Group d . ButtonGroup 23 : Which layout manager is the default for JPanel ? a . FlowLayout b . BorderLayout c . GridLayout d . none of the above 24 . A Java interface a . must contain only public abstract methods . b . can be implemented by any number of Java classes . c . reference can refer to objects of any class which implements the interface . d . all of the above 25 . Writing an application which handles mouse events can be done by a . having a GUI class implement the KeyListener interface . b . creating an inner class which extends the MouseAdapter class . c . adding mouse functionality to the paintComponent method . d . all of the above
26 . Write a Java statement using printf to output the value of Math . PI , showing 5 digits after the decimal point .
27 . Write a Java statement that declares a class called MyDrawingPanel that inherits from the JPanel class . Do not declare any methods or member variables in this class .