What does the following statement output? for(b = 1; b > 3; ++b) System.out.print(b + " "); a. 1 1 1 b. 1 2 3 c. 1 2 3 4 d. Nothing
What does the following statement output? for(f = 1, g = 4; f < g; ++f, g) System.out.print(f + " " + g + " "); a. 1 4 2 5 3 6 4 7 b. 1 4 2 3 3 2 c. 1 4 2 3 d. Nothing
a. Write an application that creates a quiz. The quiz should contain at least five questions about a hobby, popular music, astronomy, or any other personal interest. Each question should be a...
For how many integers does the following statement reserve room? int[] value = new int[34]; a. 0 b. 33 c. 34 d. 35
Which of the following can be used as an array subscript? a. char b. String c. double d. int
You created a Rock Paper Scissors game. In the game, a player entered a number to represent one of the three choices. Make the following improvements to the game: Allow the user to enter a string...
If you declare an integer array as follows, what is the value of num[2]? int[] num = {101, 202, 303, 404, 505, 606}; a. 101 b. 202 c. 303 d. Impossible to tell
Unicode value \u0000 is also known as ____________. a. Nil b. Null c. Nada d. Void
You created a Secret Phrase game similar to Hangman, in which the user guesses letters in a partially hidden phrase in an attempt to determine the complete phrase. Modify the program so that: The...
You created a class named Purchase. Each Purchase contains an invoice number, amount of sale, amount of sales tax, and several methods. Now, write a program that declares an array of five Purchase...
If a class named Student contains a method setID() that takes an int argument, and you write an application in which you create an array of 20 Student objects named scholar, which of the following...
A parallel array is one that ____________. a. Holds values that correspond to those in another array b. Holds an even number of values c. Is placed adjacent to another array in code d. Is placed...
Using a bubble sort involves comparing each array element with ____________. a. The corresponding element in a parallel array b. The adjacent element c. The arithmetic average d. The lowest element...
When array elements are objects, you usually want to sort based on a particular ____________ of the object. a. Method b. Field c. Name d. Type
The following defines a ____________ array: int[][] nums = { {1, 2}, {3, 4}, {5, 6} }; a. One-dimensional b. Two-dimensional c. Three-dimensional d. Six-dimensional
In the following array, what is the value of code[2][1]? char[][] code = { {'A ', 'D ', 'M '}, {'P ', 'R ', 'S '}, {'U ', 'V ', 'Z '} }; a. 'P' b. 'R' c. 'U' d. 'V'
In the following array, what is the value of fees[1].length? double[][] fees = { {3.00, 3.50, 4.00, 5.00}, {6.35, 7.35, 8.35, 9.00} }; a. 2 b. 4 c. 8 d. None of the above
You place ____________ after the data type in the parameter list of a method that receives a two-dimensional array. a. A pair of empty brackets b. Two pairs of empty brackets c. A pair of brackets...
An advantage to using an enumerated data type is ____________. a. Errors are reduced because only a limited set of values can be used with the type b. Time is saved because programs with enumerated...
You improved a Rock Paper Scissors game played between a user and the computer. Add an enumeration that holds three values that represent ROCK, PAPER, and SCISSORS, and use it for all comparisons in...
In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded with Fix. For example, DebugTen1.java will become...
In each case, determine the problem and fix the program. After you correct the errors, save each file using the samefilename preceded with Fix. For example, DebugEleven1.java will become...
All Java Exceptions are ____________. a. Errors b. Omissions c. Throwables d. RunTimeExceptions
In object-oriented terminology, you ____________ a procedure that might not Complete correctly. A. Handle B. Catch C. Try D. Encapsulate
A method that detects an error condition or exception ____________ an Exception. A. Throws B. Catches C. Handles D. Encapsulates
The segment of code that handles or takes appropriate action following an exception is a ____________ block. a. try b. catch c. throws d. handles
You ____________ within a try block. A. Must place only a single statement B. Can place any number of statements C. Must place at least two statements D. Must place a catch block
The catch block that begins catch(Exception e) can catch Exceptions of type ____________. a. IOException b. ArithmeticException c. Both of the above d. None of the above
An advantage to using a trycatch block is that exceptional events are ____________. A. Eliminated B. Reduced C. Integrated with regular events D. Isolated from regular events
A method can ____________. A. Check for errors but not handle them B. Handle errors but not check for them C. Either of the above D. Neither of the above
When a try block does not generate an exception and you have included Multiple catch blocks, ____________. A. No catch blocks execute B. Only the first one executes C. Only the first matching one...
The code within a finally block executes when the try block ____________. A. Identifies one or more exceptions B. Does not identify any exceptions C. Either a or b D. Neither a nor b
Which of the following is least important to know if you want to be able to use a method to its full potential? A. The number of statements within the method B. The type of arguments the method...
You can get a list of the methods through which an Exception has traveled by using the ____________ method. a. printStackTrace() b. callStack() c. getPath() d. getMessage()
Which of the following statements is true? a. Volatile storage lasts only a few seconds. b. Volatile storage is lost when a computer loses power. c. Computer disks are volatile storage devices. d....
Which of the following statements creates a Path named p to a FileStream named f? a. Path p = new Path("C:\\Java\\MyFile.txt"); b. Path p = f("C:\\Java\\MyFile.txt"); c. Path p =...
Which of the following statements always returns the same value as Files.exists(file)? a. file.checkAccess() b. file.checkAccess(EXISTS) c. file.checkAccess(READ, WRITE) d....
You cannot delete a path ____________. A. Under any circumstances B. If it represents a directory C. If it represents a directory that is not empty D. If it represents more than five levels
The data hierarchy occurs in the following order from the smallest to largest Piece of data: ____________. A. Character, record, field, file B. Character, file, record, field C. Character, field,...
When records are accessed one after the other in the order in which they were Stored, their file is being used as a ____________ access file. A. Random B. Binary C. Chronological D. Sequential
If you fail to close an output file, ____________. A. There are usually no serious consequences B. You might lose access to the written data C. Java will close it for you automatically D. Two of the...
Which of the following is true of streams? a. Streams are channels through which bytes flow. b. Streams always flow in two directions. c. Only one stream can be open in a program at a time. d. All of...
inputstream is ____________. A. A child of outputstream B. An abstract class C. Used for screen output as opposed to file output D. All of the above are true.
Javas print() and println() methods are defined in the ____________ class. a. BufferedOutputStream b. System c. PrintStream d. Print
Which of the following does the same thing as the BufferedWriter class newLine() method? a. System.getProperty("line.separator") b. Path.getProperty("line.separator") c. System.out.println() d....
The newoutputstream() method ____________. A. Is defined in the files class B. Creates a file if it does not already exist C. Opens a file for writing D. All of the above are true.
Which of the following systems is most likely to use batch processing? A. An airline reservation system B. An email application C. A point-of-sale credit checking system D. A payroll system
Which of the following cannot be specified in any version of the jtextfield constructor? A. The initial text in the field B. Requiring that the value entered be nonnumeric C. The number of columns in...
A single array element of a primitive type is passed to a method by ____________. a. Value b. Reference c. Address d. Osmosis
When you pass an array to a method, the method receives ____________. a. A copy of the array b. A copy of the first element in the array c. The address of the array d. Nothing
Fxml is ____________. A. A low-level declarative language b. An xml-based markup language c. Not as easy to use as swing to create the ui d. Dependent on explicit commands that must be performed in a...
Which of the following statements is not true? a. A JavaFX application can be run by using a Java launcher, such as java -jar MyApp.jar, or by double-clicking the JAR file. b. A JavaFX application...
Which of the following statements is not true? a. The term stage refers to an entire window. b. The Stage includes the title bar. c. The Scene contains the Stage. d. The Stage includes minimize,...
Scene builder ____________. A. Must be downloaded from google play B. Allows for the design layout to be built visually C. Is provided as a built-in class to java D. Must run inside a java IDE
Which of the following statements is true? a. Scene Builder uses WYSIWYG. b. Scene Builder does not provide a preview of the UI. c. Scene Builder requires separate layouts for each platform you are...
When are you not required to run the Make Controller command? a. You delete a widget from the Content panel in Scene Builder. b. You update an fx:id value for a widget in Scene Builder. c. You add a...
Which of the following statements is true? a. The Library panel does not allow for a search of a particular widget control. b. The Library panel simply lists all the available widgets available. c....
Which of the following statements is not true? a. It is possible for a widget to not be visible in the Content panel. b. The Hierarchy section displays a tree view representation of your layout. c....
Which of the following statements is not true? a. A style sheet can be used on any level of a layout. b. Children widgets inherit the CSS rules set on a parent control. c. You can open a CSS file...
Which of the following statements is not true? a. Animation in JavaFX must be run either sequentially or in parallel. b. Timeline animation updates property values along a progression of time. c....
The init() method is used for ____________. A. Pausing a javafx application B. Extending the application class C. Constructing a specified instance of the application class D. Performing...
Which of the following statements is not true? Javafx ____________. A. Is event driven, similar to swing B. Uses the keyword new to instantiate a class object C. Uses event handlers similar to swing...
Which of the following statements is not true? Scene builder ____________. A. Allows for live editing B. Preview requires a code recompile C. Can run as a standalone application D. Is not appropriate...
Which of the following statements is true about all JavaFX applications? a. All JavaFX must use CSS for styling. b. All JavaFX applications must call the launch() method. c. Every JavaFX calls the...
Scene builder ____________. A. Generates css files B. Requires you to choose a default javafx css style C. Does not allow you to customize the style in your application by changing a Widgets...
The css analyzer menu ____________. A. Is visible by default B. Displays style properties rules by default C. Cannot show both api and fx theme defaults D. Allows you to understand how css rules...
Prove the following identities algebraically and by means of truth tables: (a) (b) (c) (d) (e) (f) (A+B)(A+B) = 0 A+AB = A+ B
Which property determines the tab order for the controls in an interface? a. SetOrder b. SetTab c. TabIndex d. TabOrder
Which property determines the position of the text inside a label control? a. Align b. Alignment c. AlignText d. TextAlign
Create an application that calculates and displays the area of a rectangle in both square feet and square yards. The user will provide the rectangles length and width, both measured in feet. a....
Which of the following statements can be used to code a loop whose instructions you want processed 10 times? a. DoLoop b. ForNext c. All of the above.
How many times will the string literal Hi appear in the lblMsg control? Dim intCount As Integer Do While intCount > 4 lblMsg.Text = lblMsg.Text & "Hi" & ControlChars.NewLine intCount += 1 Loop a....
How many times will the string literal Hi appear in the lblMsg control? For intCount As Integer = 6 To 13 Step 2 lblMsg.Text = lblMsg.Text & "Hi" & ControlChars.NewLine Next intCount A. Three B. Four...
In addition to the sequence structure, which of the following control structures is used in flowchart B in Figure 5-46? a. Selection b. Repetition c. Both a and b. A T. -O-T- LL
In this exercise, you modify the application from Exercise 7. The modified application will display the number of rectangular tables needed to seat the bridal party as well as the number of round...
In addition to the sequence structure, which of the following control structures is used in flowchart C in Figure 5-46? a. Selection b. Repetition c. Both a and b. A T. -O-T- LL
Which of the following For clauses indicates that the loop instructions should be processed as long as the intX variables value is less than 100? a. For intX As Integer = 10 To 100 b. For intX As...
Which of the following methods is used to add items to a list box? a. Add b. AddList c. Item d. ItemAdd
What will the following code display in the lblAsterisks control? For intX As Integer = 1 To 2 For intY As Integer = 1 To 3 lblAsterisks.Text = lblAsterisks.Text & "*" Next intY lblAsterisks.Text =...
What will the following code display in the lblSum control? Dim intSum As Integer Dim intY As Integer Do While intY < 3 For intX As Integer = 1 To 4 intSum += intX Next intX intY += 1 Loop...
Which of the following calculates the monthly payment (expressed as a positive number) for a loan of $10,000 for 2 years with a 3.5% annual interest rate? a. Financial.Pmt(0.035, 2, 10000) b....
If a list boxs Sorted property is set to True, how will the numbers 4, 35, 3, 1, and 12 be displayed in the list box? a. 4, 35, 3, 1, 12 b. 1, 3, 4, 12, 35 c. 1, 12, 3, 35, 4 d. 35, 12, 4, 3, 1
Given the following circuit: (a) Derive the Boolean expression for F(A, B, C, D). (b) Derive the truth table. (c) Determine the simplified expression for F(A, B, C, D) using a K-map. (d) Draw the...
Design a combinational circuit with three inputs (A, B, C) and one output (F). The output is 1 when A + C = 0 or AC = 1; otherwise the output is 0. Draw a schematic using logic gates. Show all steps...
Consider a student club or organization in which you are a member. What are the data entities of this enterprise? List and define each entity. Then, develop an enterprise data model showing these...
What are the items that appear within parentheses in a calling statement called? A. Arguments B. Parameters C. Passers D. None of the above.
Which of the following indicates whether a variable is being passed by value or By reference? A. The calling statement B. The receiving procedures header C. The statements entered within the...
Which of the following is false? a. When you pass a variable by reference, the receiving procedure can change its contents. b. To pass a variable by reference, you include the ByRef keyword before...
The items in a combo box belong to which collection? a. Items b. List c. ListBox d. Values
Modify the Product_T table by adding an attribute QtyOnHand that can be used to track the finished goods inventory. The field should be an integer field of five characters and should accept only...
Add an order to the Order_T table and include a sample value for every attribute. a. First, look at the data in the Customer_T table and enter an order from any one of those customers. b. Enter an...
Write SQL queries to answer the following questions: a. Which students have an ID number that is less than 50000? b. What is the name of the faculty member whose ID is 4756? c. What is the smallest...
Write the SQL command to add SUBJECT to TUTOR. The only values allowed for SUBJECT will be Reading, Math, and ESL. TUTOR (TutorlD, CertDate, Status) MATCH HISTORY (MatchID, TutorlD, StudentID,...
Figure 2-27 shows two diagrams (A and B), both of which are legitimate ways to represent that a stock has a history of many prices. Which of the two diagrams do you consider a better way to model...
Modify Figure 2-11a to model the following additional information requirements: The training director decides for each employee who completes each class who (what employees) should be notified of the...
Prepare an ERD for a real estate firm that lists property for sale. Also prepare a definition for each entity type, attribute, and relationship on your diagram. In addition, draw a data model for...
For your answers to Problem and Exercise 13, transform the EER diagrams into a set of relational schemas, diagram the functional dependencies, and convert all the relations to third normal form. Data...
Explain in one paragraph at least three levels of abstraction that are used by (a) Biologists studying the operation of cells. (b) Chemists studying the composition of matter.
Based on the discussion of the Heather Sweeney Designs operational database (HSD) and dimensional database (HSD-DW) in the text, answer the following questions. A. What transformations of data were...
Design the following comparators for 32-bit numbers. Sketch the schematics. (a) Not equal (b) Greater than (c) Less than or equal to