If you have two RadioButtons (dogRadio and catRadio), how should you code them to create a mutually exclusive relationship?

a. ToggleGroup radioGroup = new ToggleGroup();
dogRadio.setToggleGroup(radioGroup);
catRadio.setToggleGroup(radioGroup):

b. ToggleGroup radioGroup = new radioGroup();
dogRadio.setToggle(radioGroup);
catRadio.setToggle(radioGroup):

c. dogRadio.setToggleGroup();
catRadio.setToggleGroup():

d. ToggleGroup dogRadio = new ToggleGroup();
ToggleGroup catRadio = new ToggleGroup();

a. ToggleGroup radioGroup = new ToggleGroup();
dogRadio.setToggleGroup(radioGroup);
catRadio.setToggleGroup(radioGroup):

Computer Science & Information Technology

You might also like to view...

If the value of s1 is "name," what is displayed by these statements?

``` cout << s1<< '\r'; cout << ""____" << endl; ``` a. name \r ____ b. name ____ c. name d. name ____

Computer Science & Information Technology

The fact that class Graphics is abstract contributes to Java’s portability because ________.

a. drawing is performed differently on every platform that supports Java. A subclass of Graphics must be created that uses the drawing capabilities of the current platform. b. objects of non-abstract classes can only be instantiated on the Windows platform. c. drawing should not be performed on non-Linux platforms. d. Class Graphics is not abstract.

Computer Science & Information Technology