Questions from Starting Out With Java


Q: Write pseudocode algorithms for the program described as follows: Available

Write pseudocode algorithms for the program described as follows: Available Credit A program that calculates a customer’s available credit should ask the user for the following: - The customer’s m...

See Answer

Q: Write nested if statements that perform the following tests: If amount1

Write nested if statements that perform the following tests: If amount1 is greater than 10 and amount2 is less than 100, display the greater of the two.

See Answer

Q: Assume that label references an existing JLabel object. Write code that

Assume that label references an existing JLabel object. Write code that stores the image in the file picture.gif in the label.

See Answer

Q: Write code that displays a file open dialog box. If the

Write code that displays a file open dialog box. If the user selects a file, the code should store the file’s path and name in a String variable.

See Answer

Q: Write the text and HTML tags necessary to display “My

Write the text and HTML tags necessary to display “My Home Page” as a level one header, centered in the browser window.

See Answer

Q: Look at the following GUI application class and indicate by line number

Look at the following GUI application class and indicate by line number the changes that should be made to convert this to an applet using Swing: public class SimpleWindow extends JFrame { public Simp...

See Answer

Q: Rewrite the following mouse motion listener so it uses an adapter class

Rewrite the following mouse motion listener so it uses an adapter class: private class MyMouseMotionListener implements MouseMotionListener { public void mouseDragged(MouseEvent e) { } public void mou...

See Answer

Q: You created a GUI in Scene Builder and saved it to a

You created a GUI in Scene Builder and saved it to a file named MyGUI.fxml. Write a main application class that loads the FXML file, builds the scene graph, and displays the GUI.

See Answer

Q: In a controller class, the variable radio1 references a RadioButton component

In a controller class, the variable radio1 references a RadioButton component, and outputLabel references a Label component. Write an if statement that determines whether the RadioButton is selected....

See Answer

Q: What is the difference between an input file and an output file

What is the difference between an input file and an output file?

See Answer