0% found this document useful (0 votes)
22 views18 pages

Programming Logic and Design Exam Review

The document is an exam review for a course on Programming Logic and Design, covering foundational programming concepts and problem-solving techniques. It includes 16 chapters with a total of 620 verified questions and flashcards, focusing on topics such as algorithms, data types, control structures, and GUI applications. Recommended study resources and sample questions are provided for each chapter to aid in exam preparation.

Uploaded by

p7pdtfn48p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views18 pages

Programming Logic and Design Exam Review

The document is an exam review for a course on Programming Logic and Design, covering foundational programming concepts and problem-solving techniques. It includes 16 chapters with a total of 620 verified questions and flashcards, focusing on topics such as algorithms, data types, control structures, and GUI applications. Recommended study resources and sample questions are provided for each chapter to aid in exam preparation.

Uploaded by

p7pdtfn48p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Programming Logic and Design

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

computer programming and problem-solving techniques. The course focuses on

developing logical thinking by teaching students how to break down problems, design

algorithms, and represent solutions using flowcharts, pseudocode, and basic

programming structures such as sequence, selection, and iteration. Concepts such as

data types, variables, input/output, and modular program design are covered, providing

a language-independent approach that lays the groundwork for future programming

courses. Students will analyze real-world scenarios, apply logical reasoning, and refine

their ability to create clear, effective solutions to computational problems.

Recommended Textbook
Starting Out with Java Early Objects 5th Edition by Tony Gaddis

Available Study Resources on Quizplus


16 Chapters
620 Verified Questions
620 Flashcards
Source URL: https://quizplus.com/study-set/1061

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

Q2) Java source files end with the .class extension.


A)True
B)False
Answer: False

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

Q3) The ________ method is used to display a message dialog.


A) showMessageDialog
B) messageDialog
C) messageDialogShow
D) showDialog
Answer: A

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

Q2) Look at the following declaration:


Enum Tree { OAK, MAPLE, PINE }
What is the fully-qualified name of the PINE enum constant?
A) enum.PINE
B) PINE
C) Tree.PINE
D) enum.Tree.PINE

Q3) A method's signature consists of


A) the method name and the parameter list.
B) the return type, the method name, and the parameter list.
C) the size of the method in memory.
D) the return type and the method name.

Q4) An enumerated data type is actually a special type of class.


A)True
B)False

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.

Q2) What does &lt;String&gt; specify in the following statement?


ArrayList&lt;String&gt; nameList = new ArrayList&lt;String&gt;();
A) It specifies that String objects may not be stored in the ArrayList object.
B) It specifies that everything stored in the ArrayList object will be converted to a String
object.
C) It specifies that only String objects may be stored in the ArrayList object.
D) It specifies that the ArrayList will be converted into a String array.

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

Q2) The following catch clause


Catch (Exception e)
A) can handle all throwable objects by using a polymorphic reference for the parameter.
B) can handle all exceptions that are instances of the Exception class or one of its
subclasses.
C) can handle all exceptions that are instances of the Exception class, but not its
subclasses.
D) causes a compiler error.

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 &lt;br&gt;,
paragraph break &lt;p&gt;, and horizontal rule &lt;hr&gt; 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) &lt;h1&gt;History&lt;/h1&gt;
B) &lt;title&gt;History&lt;/title&gt;
C) &lt;h6&gt;History&lt;/h6&gt;
D) &lt;head&gt;History&lt;/head&gt;

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

Q2) Which of the following problems can be solved recursively?


A) greatest common denominator
B) towers of Hanoi
C) binary search
D) All of the Above

Q3) A method that calls itself is a ________ method.


A) recursive
B) redundant
C) binary
D) derived

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

Q3) This SQL statement can be used to create a database table.


A) NEW TABLE
B) MAKE TABLE
C) BUILD TABLE
D) CREATE TABLE

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

You might also like