Programming Logic and Design Exam Review
Programming Logic and Design Exam Review
Exam Review
https://quizplus.com/study-set/1061
16 Chapters
620 Verified Questions
Programming Logic and Design
Exam Review
Cou
Programming Logic and Design introduces students to the foundational concepts of
developing logical thinking by teaching students how to break down problems, design
data types, variables, input/output, and modular program design are covered, providing
courses. Students will analyze real-world scenarios, apply logical reasoning, and refine
Recommended Textbook
Starting Out with Java Early Objects 5th Edition by Tony Gaddis
Page 2
Chapter 1: Introduction to Computers and Java
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20979
Sample Questions
Q1) One of the design tools used by programmers when creating a model of the
program is
A) ALU.
B) pseudocode.
C) byte code.
D) syntax.
Answer: B
Q3) A solid-state drive has no moving parts and operates faster than a traditional disk
drive.
A)True
B)False
Answer: True
Q4) Logical errors are mistakes that cause the program to produce erroneous results.
A)True
B)False
Answer: True
To view all questions and flashcards with Page 3 click on the resource link above.
answers,
Chapter 2: Java Fundamentals
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20980
Sample Questions
Q1) What is the result of the following expression?
10 + 5 * 3 - 20
A) -5
B) -50
C) 5
D) 25
Answer: C
Q2) The Java API provides a class named Math, which contains numerous methods that
are useful for performing complex mathematical operations.
A)True
B)False
Answer: True
To view all questions and flashcards with answers, click on the resource link above.
Page 4
Chapter 3: A First Look at Classes and Objects
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20981
Sample Questions
Q1) The public access specifier for a field indicates that the field may not be accessed by
statements outside the class.
A)True
B)False
Answer: False
Q2) To indicate the data type of a variable in a UML diagram, you specify
A) the variable name followed by the data type.
B) the class name followed by the variable name followed by the data type.
C) the variable name followed by a colon and the data type.
D) the data type followed by the variable name.
Answer: C
Q3) In the blueprint/house analogy, think of a class as a blueprint that describes a house
and ________ as instances of the house built from the blueprint.
A) methods
B) fields
C) objects
D) attributes
Answer: C
To view all questions and flashcards with answers, click on the resource link above.
Page 5
Chapter 4: Decision Structures
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20982
Sample Questions
Q1) Which of the following strings could be passed to the DecimalFormat constructor to
display 12.78 as 012.8?
A) "###.#"
B) "000.0"
C) "##0.0%"
D) "$#0.00"
Q2) The DecimalFormat class is part of the Java API, but it is not automatically available
to your programs.
A)True
B)False
Q3) If str1 and str2 are both String objects, which of the following expressions will correctly
determine whether or not they are equal?
A) str1 == str2
B) str1 && str2
C) str1.equals(str2)
D) str1 + str2
To view all questions and flashcards with answers, click on the resource link above.
Page 6
Chapter 5: Loops and Files
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20983
Sample Questions
Q1) In a for loop, the control variable can only be incremented.
A)True
B)False
Q2) What will be the value of x after the following code is executed?
Int x = 10, y = 20;
While (y < 100)
{
X += y;
Y += 20;
}
A) 130
B) 210
C) 110
D) 90
Q3) When the continue statement is encountered in a loop, all the statements in the
body of the loop that appear after it are ignored, and the loop prepares for the next
iteration.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 7
Chapter 6: A Second Look at Classes and Objects
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20984
Sample Questions
Q1) You can use the enum key word to
A) create your own data type.
B) specify the values that belong to that type.
C) Both A and B
D) Neither A nor B
To view all questions and flashcards with Page 8 click on the resource link above.
answers,
Chapter 7: Arrays and the ArrayList Class
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20985
Sample Questions
Q1) A search algorithm
A) arranges elements in ascending order.
B) arranges elements in descending order.
C) is used to locate a specific item in a larger collection of data.
D) is rarely used with arrays.
Q3) A sorting algorithm is used to locate a specific item in a larger collection of data.
A)True
B)False
Q4) Java does not limit the number of dimensions that an array may have.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 9
Chapter 8: Text Processing and Wrapper Classes
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20986
Sample Questions
Q1) In the ________ file format, when the data in a spreadsheet is exported, each row
is written to a line, and the values in the cells are separated by commas.
A) comma separated value
B) extensible markup language
C) excel binary
D) data interchange
Q2) Which of the following import statements is required to use the StringTokenizer
class?
A) import java.util.Scanner
B) import java.text.DecimalFormat;
C) import java.util.StringTokenizer;
D) import javax.swing.JOptionPane;
Q3) Which of the following statements converts an int variable named number to a
string and stores the value in the String object variable named str?
A) String str = Integer.toString(number);
B) String str = number.Integer.toString(str);
C) String str = integer(number);
D) String str = integer.toString(number);
To view all questions and flashcards with answers, click on the resource link above.
Page 10
Chapter 9: Inheritance
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20987
Sample Questions
Q1) A protected member of a class may be directly accessed by
A) methods of the same class.
B) methods of a subclass.
C) methods in the same package.
D) All of the above
Q2) In a UML diagram, you show a realization relationship by connecting a class and an
interface with a
A) dashed line that has an open arrowhead at one end.
B) line that has an open diamond at one end.
C) dashed line.
D) line that has an open arrowhead at one end.
Q3) If ClassC is derived from ClassB, which is derived from ClassA, this would be an
example of
A) a chain of inheritance.
B) linear inheritance.
C) multiple interfaces.
D) cascading classes.
To view all questions and flashcards with answers, click on the resource link above.
Page 11
Chapter 10: Exceptions and Advanced File I/O
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20988
Sample Questions
Q1) A class must implement the Serializable interface in order for objects of the class to
be serialized.
A)True
B)False
Q3) If a random access file contains a stream of characters, which of the following
statements would move the file pointer to the starting byte of the fifth character in the
file?
A) file.seek(4);
B) file.seek(8);
C) file.seek(10);
D) file.seek(5);
To view all questions and flashcards with answers, click on the resource link above.
Page 12
Chapter 11: GUI Applications–Part 1
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20989
Sample Questions
Q1) Event listeners must
A) exit the application once it has handled the event.
B) not receive any arguments.
C) be included in private inner classes.
D) implement an interface.
Q2) A(n) ________ is an action that takes place within a program, such as the clicking
of a button.
A) event
B) selection
C) incident
D) choice
Q3) If panel references a JPanel object, which of the following statements adds the
GridLayout to it?
A) panel.GridLayout(2,3);
B) panel.addLayout(new GridLayout(2,3));
C) panel.attachLayout(GridLayout(2,3));
D) panel.setLayout(new GridLayout(2,3));
Q4) It is possible to write the main method directly into a GUI class.
A)True
B)False
To view all questions and flashcards withPage 13 click on the resource link above.
answers,
Chapter 12: GUI Applications–Part 2
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20990
Sample Questions
Q1) If multiple items have been selected in a list component, you should use the
getSelectedValues or getSelectedIndices methods to retrieve the selected items.
A)True
B)False
Q2) If you call the JTextField component's setEditable method and pass false as the
argument, then the text field becomes
A) unbound.
B) editable.
C) invisible.
D) read-only.
Q3) When using a slider, by default, tick marks are not displayed, and setting their
spacing does not cause them to be displayed.
A)True
B)False
Q4) To give a combo box a text field, you must call the setEditable method and pass
false as an argument.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 14
Chapter 13: Applets and More
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20991
Sample Questions
Q1) A Timer object does not begin generating action events until it is started with a call to
its getDelay method.
A)True
B)False
Q2) Which of the following statements is correct regarding the line break <br>,
paragraph break <p>, and horizontal rule <hr> HTML tags.
A) These tags are unique from other tags because they do not occur in pairs.
B) These tags are used to create breaks in an HTML document's text.
C) When you use one of these tags, you insert only an opening tag.
D) All of the above
Q3) Which of the following statements would you write in an HTML document to display
the text "History" as a level one header?
A) <h1>History</h1>
B) <title>History</title>
C) <h6>History</h6>
D) <head>History</head>
Q4) The mouse generates two types of events: mouse events and mouse motion events.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 15
Chapter 14: Creating GUI Applications with JavaFX
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20992
Sample Questions
Q1) To place a component in a GUI, you simply drag it from the Library Panel, and drop it
into the
A) Content Panel.
B) Hierarchy Panel.
C) Selection Bar.
D) Inspector Panel.
Q2) You can write a JavaFX GUI application using nothing but Java code.
A)True
B)False
Q3) ________ are useful when you want the user to select one choice from several
possible options.
A) RadioButtons
B) CheckBoxes
C) Buttons
D) Labels
Q4) This is a markup language that describes the components in a JavaFX scene graph.
A) SGML
B) HTML
C) XML
D) FXML
To view all questions and flashcards withPage 16 click on the resource link above.
answers,
Chapter 15: Recursion
Available Study Resources on Quizplus for this Chatper
20 Verified Questions
20 Flashcards
Source URL: https://quizplus.com/quiz/20993
Sample Questions
Q1) The recursive binary search algorithm is a good example of repeatedly breaking a
problem down into smaller pieces until it is solved.
A)True
B)False
Q4) The Towers of Hanoi is a mathematical game that is often used in computer science
textbooks to illustrate the power of recursion.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 17
Chapter 16: Databases
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/20994
Sample Questions
Q1) System designers commonly use UML diagrams to show the relationships between
database tables.
A)True
B)False
Q2) A column in one table that references a primary key in another table is known as
what?
A) Secondary key
B) Foreign key
C) Referential key
D) Meta key
Q4) SQL statements that are stored in the DBMS are called resident queries.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 18