Question
Book Icon
Chapter 9, Problem 7PP
Program Plan Intro

Short survey

Program plan:

  • Import required packages.
  • Define the main class “SurveyForm”.
    • Define the “main ()” method.
      • Launch the application.
    • Override the “start ()” method.
      • Create an object for “VBox” container.
      • Add a label to the container.
      • Create an object for “ToggleGroup”.
      • Create three radio buttons for the colors “Red”, “Orange”, “Blue”, and “Green” and these buttons to the toggle group.
      • Add all the radio buttons to the container.
      • Get the age from the user using “Spinner”
      • Set the value and add the spinner to the container.
      • Get the favorite programming language by using a “ChoiceBox” and add it to the container.
      • Create an action event for clicking the “submitBtn”.
        • Override the “handle ()” method.
          • Declare a variable “color”.
          • Check if “redRB” is selected.
            • Assign the color “red” to the variable “color.”
          • Check if “greenRB” is selected.
            • Assign the color “green” to the variable “color.”
          • Check if “orangeRB” is selected.
            • Assign the color “orange” to the variable “color.”
          • Check if “blueRB” is selected.
            • Assign the color “blue” to the variable “color.”
        • Print the color, age and programming language on the screen.
              • Add the submit button to the container.
              • Create a scene and place it on the stage.
              • Set the title.
              • Display the stage.

Blurred answer
Students have asked these similar questions
What types of data visualizations or tools based on data visualizations have you used professionally, whether in a current or past position? What types of data did they involve? What, in your experience, is the value these data views or tools added to your performance or productivity?
Question: Finding the smallest element and its row index and column index in 2D Array: 1. Write a public Java class min2D. 2. In min2D, write a main method. 3. In the main method, create a 2-D array myArray with 2 rows and 5 columns: {{10, 21, 20, 13, 1}, {2, 6, 7, 8, 14}}. 4. Then, use a nested for loop to find the smallest element and its row index and column index. 5. Print the smallest element and its row index and column index on Java Console
(using R)The iris data set in R gives the measurements in centimeters of the variables sepal length and width andpetal length and width, respectively, for 50 flowers from each of 3 species of iris, setosa, versicolor, andvirginica. Use the iris data set and the t.test function, test if the mean of pepal length of iris flowers isgreater than the mean of sepal length.The iris data set in R gives the measurements in centimeters of the variables sepal length and width andpetal length and width, respectively, for 50 flowers from each of 3 species of iris, setosa, versicolor, andvirginica. Use the iris data set and the t.test function, test if the mean of pepal length of iris flowers isgreater than the mean of sepal length.

Chapter 9 Solutions

Java: An Introduction To Problem Solving And Programming Plus Mylab Programming With Pearson Etext -- Access Card Package (8th Edition)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning