Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help ASAP Question 196 pts (TCO 2) What is wrong with the following C++ statements? int * iptr; double d = 123.321; iptr =

Please help ASAP

Question 196 pts

(TCO 2) What is wrong with the following C++ statements? int * iptr; double d = 123.321; iptr = &d; cout << *iptr;

The cout statement does not contain an endl.
The space following the ampersand should not be there.
The iptr variable cannot be given an address of a double.
All of the above

Flag this Question

Question 206 pts

(TCO 2) What does the following Java code do? JPanel pane = new JPanel( ); pane.setLayout( new gridLayout(2, 3) );

Creates a panel that will organize its components into five distinct cells
Creates a panel that displays a grid containing the numbers 2 and 3
Creates a panel that will organize its components into two rows of three columns
None of the above

Flag this Question

Question 216 pts

(TCO 2) What is the result of the following code? JFrame frame = new JFrame( ); frame.add(new JButton(One), BorderLayout.NORTH); frame.add(new JButton(Two), BorderLayout.NORTH); frame.setVisible(true);

Two buttons are added side by side at the top of the display.
Button One was added first, so it is the only button at the top of the display.
Button Two was added last, so it is the only button at the top of the display.
The Java compiler will not allow you to add two buttons to the same area.

Flag this Question

Question 226 pts

(TCO 2) What can you say about the following Java class? Public class MyApp extends JFrame ( )

MyApp is a Java application.
MyApp implements the JFrame interface.
MyApp inherits from the JFrame class.
MyApp has a nested inner class called JFrame.

Flag this Question

Question 236 pts

(TCO 2) Which of the following is an example of the invocation of a static method in Java?

Integer.parseInt(someString);
Math.pow(2, 3);
String.format(This is an output string);
All of the above

Flag this Question

Question 246 pts

(TCO 2) Which of the following Java statements gets an integer value from the user? public class MyApp extends JFrame implements ActionListener { }

int x = Integer.parseInt(JOptionPane.showInputDialog(Enter an integer value));
int x = JOptionPane.getInteger(Enter an integer value);
int x = Scanner.getInt(Enter an integer value);
int x = String.toInt(JOptionPane.showMessageDialog(Enter an integer value));

Flag this Question

Question 256 pts

(TCO 2) Which of the following creates a multiline display that is user editable?

JLabel display = new JLabel(Enter text);
JTextField display = new JTextField(Enter text);
JTextArea display = new JTextArea(20, 20);
JScrollPane display = new JScrollPane( );

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions

Question

Write formal and conversational proposals

Answered: 1 week ago

Question

2. Why has the conflict escalated?

Answered: 1 week ago

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago