Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (TCOs 16) The data displayed in a JTable can be provided by a _____ object. (Points : 4) TableModel GridModel DefaultTableModel TableGridModel Question 2.

1. (TCOs 16) The data displayed in a JTable can be provided by a _____ object. (Points : 4)
TableModel GridModel DefaultTableModel TableGridModel

Question 2.2. (TCOs 16) What is the output of the code below? double num = 56.4321; System.out.printf("%.1f", 56.4321); (Points : 4)
%.1f %.1f56.4321 56.4321 56.4

Question 3.3. (TCOs 16) The signature of a method consists of (Points : 4)
method name and parameter list. return type method name. parameter list.

Question 4.4. (TCOs 16) Assume int[ ] t = {1, 2, 3, 4}. What is t.length? (Points : 4)
5 4 0 3

Question 5.5. (TCOs 1, 2, and 6) You must call most methods other than _____ explicitly to tell them to perform their tasks. (Points : 4)
public methods main private methods static methods

Question 6.6. (TCOs 16) Invoking _____ removes all elements in an ArrayList x. (Points : 4)
x.delete() x.clear() x.empty() x.remove()

Question 7.7. (TCOs 1, 4, and 6) In order for multiple radio buttons to function as a group, they must all be added to the same (Points : 4)
JButton. JGroup. RadioGroup. ButtonGroup.

Question 8.8. (TCOs 16) What is the output of running class C? class A { public A() { System.out.println( "Calling default constructor of A"); } } class B extends A { public B() { System.out.println("Calling default constructor of B"); } } public class C { public static void main(String[ ] args) { B b = new B(); } } (Points : 4)
Calling default constructor of A Calling default constructor of B Callng default constructor of A Calling default constructor of A Calling default constructor of B Calling default constructor of B

Question 9.9. (TCOs 16) Which statement creates an ArrayList that holds the class type Employee? (Points : 4)
new ArrayList[ Employee ]. ArrayList.Employee(). new ArrayList(). new Employee.ArrayList[].

Question 10.10. (TCOs 1, 5, and 6) A string with delimiters can be parsed into separate fields using the _____ class. (Points : 4)
StringParse ParseString StringTokenizer TokenizeString

Question 11.11. (TCOs 16) The title of a JFrame can be set by using which statement in the constructor of your class that extends JFrame? (Points : 4)
super(Title here); setFrameTitle(Title here); setTitleFrame(Title here); JFrame.super(Title here);

Question 12.12. (TCOs 1, 5, and 6) Which type of exception occurs if the write method of BufferedWriter cannot write data to the file? (Points : 4)
WriteException IOException FileIOException FileException

Question 13.13. (TCOs 16) Suppose a JFrame uses the GridLayout(0, 2). If you add six buttons to the frame, how many rows are displayed? (Points : 4)
2 3 1 4

Question 14.14. (TCOs 16) The _____ method of an event object returns the object that caused the event. (Points : 4)
getSource() getEvent() getEventObject() getWhen()

Question 15.15. (TCOs 16) The datatype returned by the JOptionPane.showInputDialog method is (Points : 4)
String. int. double. specified by the user in the method call.

Question 16.16. (TCOs 1, 4, and 6) Menus are attached to windows by calling the _____ method. (Points : 4)
addMenuBar setJMenuBar setMenu addJMenuBar

Question 17.17. (TCOs 16) When implementing a method, use the classs set and get methods to access the classs _____ data. (Points : 4)
public private protected All of them

Question 18.18. (TCOs 1, 4, and 6) The method used to add panels to a JTabbedPane is (Points : 4)
newTab. newPanel. addPanel. addTab.

Question 19.19. (TCOs 16) A constructor cannot (Points : 4)
be overloaded. initialize variables to their defaults. specify return types or return values. have the same name as the class.

Question 20.20. (TCOs 16) Given the declaration Circle x = new Circle(), which of the following statements is most accurate? (Points : 4)
x contains an int value. You can assign an int value to x. x contains an object of the Circle type. x contains a reference to a Circle object.

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

Differentiate the function. r(z) = 2-8 - 21/2 r'(z) =

Answered: 1 week ago