100% found this document useful (1 vote)
588 views6 pages

Self-Quiz Unit 6 - Attempt Review

The document summarizes the student's attempt at a self-quiz for their CS 1102 course Unit 6. The student answered 5 multiple choice questions correctly, receiving full marks of 5 out of 5 with a grade of 100%. The questions covered topics around JavaFX, packages, event listeners and handlers, and importing classes. The student demonstrated an understanding of these key concepts discussed in Unit 6.

Uploaded by

Dr Tech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
588 views6 pages

Self-Quiz Unit 6 - Attempt Review

The document summarizes the student's attempt at a self-quiz for their CS 1102 course Unit 6. The student answered 5 multiple choice questions correctly, receiving full marks of 5 out of 5 with a grade of 100%. The questions covered topics around JavaFX, packages, event listeners and handlers, and importing classes. The student demonstrated an understanding of these key concepts discussed in Unit 6.

Uploaded by

Dr Tech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

10/14/21, 12:28 AM Self-Quiz Unit 6: Attempt review

Dashboard / My courses /
CS 1102 - AY2022-T1 / 7 October - 13 October /
Self-Quiz Unit 6

Started on Wednesday, 13 October 2021, 1:50 PM


State Finished
Completed on Wednesday, 13 October 2021, 1:57 PM
Time taken 7 mins 35 secs
Marks 5.00/5.00
Grade 100.00 out of 100.00

https://my.uopeople.edu/mod/quiz/review.php?attempt=5810117&cmid=265370 1/6
10/14/21, 12:28 AM Self-Quiz Unit 6: Attempt review

Question 1

Correct

Mark 1.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 correct.


See Section 6.3.1.

https://my.uopeople.edu/mod/quiz/review.php?attempt=5810117&cmid=265370 2/6
10/14/21, 12:28 AM Self-Quiz Unit 6: Attempt review

Question 2

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=5810117&cmid=265370 3/6
10/14/21, 12:28 AM Self-Quiz Unit 6: Attempt review

Question 3

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.

Question 4

Correct

Mark 1.00 out of 1.00

Which one of the following is an event handler?

Select one:
a. an event generator

b. an event listener 

c. an event loop

d. an event method

e. javafx.scene.input.MouseEvent;

Your answer is correct.

See Section 6.3.1.

https://my.uopeople.edu/mod/quiz/review.php?attempt=5810117&cmid=265370 4/6
10/14/21, 12:28 AM Self-Quiz Unit 6: Attempt review

Question 5

Correct

Mark 1.00 out of 1.00

Consider the following Java program. Which line gives the "TestFX" class access to the "Button" class definition?
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. Button
quitButton = new Button("Quit");

b. import
javafx.application.Application;

c. import javafx.scene.control.Button; 

d. root.setBottom(buttonBar);

e. public
class TestFX extends Application

Your answer is correct.


See
Section 6.3.1

https://my.uopeople.edu/mod/quiz/review.php?attempt=5810117&cmid=265370 5/6
10/14/21, 12:28 AM Self-Quiz Unit 6: Attempt review

◄ Learning Journal Unit 6

Jump to...

Graded Quiz Unit 6 ►

https://my.uopeople.edu/mod/quiz/review.php?attempt=5810117&cmid=265370 6/6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy