Title | Self-Quiz Unit 6 Attempt review |
---|---|
Author | The Cracker |
Course | Programming 1 |
Institution | University of the People |
Pages | 5 |
File Size | 171.3 KB |
File Type | |
Total Downloads | 59 |
Total Views | 140 |
Quiz 6...
10/13/21, 1:31 PM
Started on
Self-Quiz Unit 6: Attempt review
Wednesday, 13 October 2021, 11:18 PM
State Finished Completed on Wednesday, 13 October 2021, 11:27 PM Time taken
9 mins 28 secs
Marks 3.00/5.00 Grade 60.00out of 100.00 Question1 Correct Mark 1.00 out of 1.00
Consider the following Java program.Which one of the following is a package?
import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.application.Platform; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.control.Button; public class TestFX extends Application { public void start(Stage stage) { Button quitButton = new Button("Quit"); quitButton.setOnAction(e -> Platform.exit()); HBox buttonBar = new HBox(quitButton); BorderPane root = new BorderPane(); root.setBottom(buttonBar); Scene scene = new Scene(root, 100, 50); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } }
Select one: a. javafx.scene.Scene b. start c.
Stage
d. Button e. BorderPane
Your answer is correct. See Section 4.6.2.
https://my.uopeople.edu/mod/quiz/review.php?attempt=5813183&cmid=265370
1/5
10/13/21, 1:31 PM
Self-Quiz Unit 6: Attempt review
Question2 Correct Mark 1.00 out of 1.00
Consider the following Java program.What is the superclass of "TestFX"? import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.application.Platform; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.control.Button; public class TestFX extends Application { public void start(Stage stage) { Button quitButton = new Button("Quit"); quitButton.setOnAction(e -> Platform.exit()); HBox buttonBar = new HBox(quitButton); BorderPane root = new BorderPane(); root.setBottom(buttonBar); Scene scene = new Scene(root, 100, 50); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } }
Select one: a. ActionEvent b. ActionListener c.
launch
d. start e. Application
Your answer is correct. See Section 5.5.2.
https://my.uopeople.edu/mod/quiz/review.php?attempt=5813183&cmid=265370
2/5
10/13/21, 1:31 PM
Self-Quiz Unit 6: Attempt review
Question3 Incorrect Mark 0.00 out of 1.00
Consider the following Java program.Which statement registers an object to receive events? import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.application.Platform; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.control.Button; public class TestFX extends Application { public void start(Stage stage) { Button quitButton = new Button("Quit"); quitButton.setOnAction(e -> Platform.exit()); HBox buttonBar = new HBox(quitButton); BorderPane root = new BorderPane(); root.setBottom(buttonBar); Scene scene = new Scene(root, 100, 50); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } }
Select one: a. import javafx.scene.control.Button; b. Button quitButton = new Button("Quit"); c.
quitButton.setOnAction(e -> Platform.exit());
d. root.setBottom(buttonBar); e. stage.setScene(scene);
Your answer is incorrect. See Section 6.3.1.
https://my.uopeople.edu/mod/quiz/review.php?attempt=5813183&cmid=265370
3/5
10/13/21, 1:31 PM
Self-Quiz Unit 6: Attempt review
Question4 Correct Mark 1.00 out of 1.00
A class that implements a listener interface does which of the following?
Select one: a. It generates events. b. It handles events. c.
It maintains an object directory.
d. It records audio. e. It runs an event loop.
Your answer is correct. See Section 6.3.1.
https://my.uopeople.edu/mod/quiz/review.php?attempt=5813183&cmid=265370
4/5
10/13/21, 1:31 PM
Self-Quiz Unit 6: Attempt review
Question5 Incorrect Mark 0.00 out of 1.00
Consider the following Java program.Which statement displays a window with a button on the screen? import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.application.Platform; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.control.Button; public class TestFX extends Application { public void start(Stage stage) { Button quitButton = new Button("Quit"); quitButton.setOnAction(e -> Platform.exit()); HBox buttonBar = new HBox(quitButton); BorderPane root = new BorderPane(); root.setBottom(buttonBar); Scene scene = new Scene(root, 100, 50); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } }
Select one: a. HBox buttonBar = new HBox(quitButton); b. BorderPane root = new BorderPane(); c.
Scene scene = new Scene(root, 100, 50);
d. stage.setScene(scene); e. stage.show();
Your answer is incorrect. See Section 6.1.1.
https://my.uopeople.edu/mod/quiz/review.php?attempt=5813183&cmid=265370
5/5...