The parent of the MarginalTaxMain is Application. This an example of inheritance. package edu.citytech.cst.client.sample.marginaltax; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class MarginalTaxMain extends Application { + public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage stage) throws Exception { String fileName = "/fxml/MarginalTaxView.fxml"; Parent root = FXMLLoader.load(getClass().getResource(fileName)); Scene scene = new Scene(root); stage.setTitle("Marginal Tax By Jean Boulet"); stage.setScene(scene); stage.show(); stage.setResizable(false); }
Added by Amy P.
Close
Step 1
Step 1: The parent class of MarginalTaxMain is Application. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
a. Create a class named Lease with fields that hold an apartment tenant's name, apartment number, monthly rent amount, and term of the lease in months. Include a constructor that initializes the name to "XXX", the apartment number to 0, the rent to 1000, and the term to 12. Also include methods to get and set each of the fields. Include a non-static method named addPetFee() that adds $10 to the monthly rent value and calls a static method named explainPetPolicy() that explains the pet fee. Save the class as Lease.java. b. Create a class named TestLease whose main() method declares four Lease objects. Call a getData() method three times. Within the method, prompt a user for values for each field for a Lease, and return a Lease object to the main() method where it is assigned to one of main()'s Lease objects. Do not prompt the user for values for the fourth Lease object, but let it continue to hold the default values. Then, in main(), pass one of the Lease objects to a showValues() method that displays the data. Then call the addPetFee() method using the passed Lease object and confirm that the fee explanation statement is displayed. Next, call the showValues() method for the Lease object again and confirm that the pet fee has been added to the rent. Finally, call the showValues() method with each of the other three objects; confirm that two hold the values you supplied as input and one holds the constructor default values. Save the application as TestLease.java.
Willis J.
Assume a JavaFX application has a Button control named myButton, and a Label control named outputLabel. Write an event handler class that can be used with the Button control. The event handler class should display the string “Hello World” in the outputLabel.
Supreeta N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD