Skip to main content

Software Engineering Review Questions - 2169 Verified Questions

Page 1


Software Engineering Review Questions

Course Introduction

Software Engineering is the disciplined application of engineering principles to the design, development, testing, and maintenance of software systems. This course covers the software development lifecycle, from requirements analysis and system specification to implementation, verification, and maintenance. Students will learn about methodologies such as agile and waterfall, project management practices, software design patterns, version control, testing strategies, and quality assurance. Emphasis is placed on teamwork, effective communication, and ethical considerations in the delivery of robust, scalable, and maintainable software solutions that meet user needs.

Recommended Textbook

Big Java Late Objects 1st Edition by Cay S. Horstmann

Available Study Resources on Quizplus

24 Chapters

2169 Verified Questions

2169 Flashcards

Source URL: https://quizplus.com/study-set/3769

Page 2

Chapter 1: Introduction

Available Study Resources on Quizplus for this Chatper

96 Verified Questions

96 Flashcards

Source URL: https://quizplus.com/quiz/75165

Sample Questions

Q1) These two lines of code do not produce the same output. Why?

System.out.println(7 + 3); System.out.println("7 + 3");

A) Arithmetic calculations cannot take place within the println method call.

B) In fact, the two statements do produce the same output.

C) The quotes cause the second expression to be treated as a string.

D) Because there are no escape characters.

Answer: C

Q2) Consider the following statements about folders and your integrated development environment (IDE):

I. Hierarchical folders help to organize a project.

II. Folders are a way to visualize the layout of a file system.

III. Folders make it impossible to lose or accidentally delete a file.

A) Only I is correct

B) I, II, and III are correct

C) Only I and II are correct

D) Only III is correct

Answer: C

To view all questions and flashcards with answers, click on the resource link above.

3

Chapter 2: Fundamental Data Types

Available Study Resources on Quizplus for this Chatper

103 Verified Questions

103 Flashcards

Source URL: https://quizplus.com/quiz/75166

Sample Questions

Q1) Which one of the following reserved words is used in Java to represent a value without a fractional part?

A) integer

B) int

C) Int

D) Float

Answer: B

Q2) What is the output of the following code snippet? Public static void main(String[] args)

{

Double a;

A = Math.sqrt(9.0) + Math.sqrt(16.0);

System.out.println(a);

}

A) 25.0

B) 337.0

C) 7.0

D) 19.0

Answer: C

To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Decisionseasy

Available Study Resources on Quizplus for this Chatper

99 Verified Questions

99 Flashcards

Source URL: https://quizplus.com/quiz/75167

Sample Questions

Q1) What can be done to improve the following code fragment?

If ((counter % 10) == 0)

{ System.out.println("Counter is divisible by ten: " + counter); Counter++;

} Else

{

System.out.println("Counter is not divisible by ten: " + counter);

Counter++;

}

A) Move the duplicated code outside of the if statement

B) Shorten variable names

C) Move the brackets to save several lines of code

D) Add semicolons after the if condition and the else reserved word

Answer: A

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Loops

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75168

Sample Questions

Q1) What is the output of the following code fragment?

Int i = 1;

Int sum = 0;

While (i <= 11)

{ Sum = sum + i;

I++;

} System.out.println("The value of sum is " + sum);

A) The value of sum is 65

B) The value of sum is 66

C) The value of sum is 55

D) The value of sum is 56

Q2) A loop inside another loop is called:

A) A sentinel loop

B) A nested loop

C) A parallel loop

D) A do/while loop

To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Methods

Available Study Resources on Quizplus for this Chatper

94 Verified Questions

94 Flashcards

Source URL: https://quizplus.com/quiz/75169

Sample Questions

Q1) What is the output of the following code snippet?

Public static int recurrAverage(int num)

{ Int sum = 0; For (int x = 1; x <= num; x++)

{ Sum = sum + x;

Return sum / num;

Public static void main(String[] args)

{ System.out.println(recurrAverage(recurrAverage(16))); }

A) 4

B) 8

C) 12

D) 16

To view all questions and flashcards with answers, click on the resource link above.

Page 7

Chapter 6: Arrays and Arraylists

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75170

Sample Questions

Q1) What is the output of the following code snippet?

ArrayList&lt;Integer&gt; num; Num)add(4); System.out.println(num.size());

A) 1

B) 0

C) 4

D) Error because num is not initialized

Q2) Which statement is true about the code snippet below?

ArrayList&lt;String&gt; names = new ArrayList&lt;String&gt;(); Names.add("John"); Names.add("Jerry");

ArrayList&lt;String&gt; friends = new ArrayList&lt;String&gt;(names); Names.add("Harry");

A) The final size of names is 2; the final size of friends is 3

B) The final size of names is 3; the final size of friends is 2

C) The final size of names is 3; the final size of friends is 3

D) Compilation error

To view all questions and flashcards with answers, click on the resource link above.

8

Chapter 7: Inputoutput and Exception Handling

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75171

Sample Questions

Q1) Insert the missing code in the following code fragment. This fragment is intended to write an output file named dataOut.txt that resides in a folder named reports on the C: drive of a Windows system.

Public static void main(String[] args) throws IOException

{

PrintWriter outputFile = _______; )

}

A) new PrintWriter("c:/reports/dataOut.txt")

B) new PrintWriter("c://reports//dataOut.txt")

C) new PrintWriter("c:\reports\dataOut.txt")

D) new PrintWriter("c:\\reports\\dataOut.txt")

Q2) Which of the following statements about exception handling is recommended by the textbook?

A) All exceptions should be handled where they are first detected.

B) All exceptions should be handled at the top of the chain of methods.

C) Throw an exception only when the problem can be handled.

D) Throw an exception as soon as a problem is detected, but only catch exceptions when the problem can be handled.

To view all questions and flashcards with answers, click on the resource link above.

Page 9

Chapter 8: Objects and Classes

Available Study Resources on Quizplus for this Chatper

101 Verified Questions

101 Flashcards

Source URL: https://quizplus.com/quiz/75172

Sample Questions

Q1) Private instance variables ___.

A) can only be accessed by methods of a different class

B) can only be accessed by methods of the same class

C) cannot be accessed by methods of the same class

D) can only be accessed by the constructor of the class

Q2) The ____ operator is used to construct an object from a class.

A) add

B) create

C) new

D) construct

Q3) The utility that formats program comments into a set of documents that you can view in a Web browser is called ____.

A) javadoc

B) javac

C) javad

D) java

To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Inheritance and Interfaces

Available Study Resources on Quizplus for this Chatper

99 Verified Questions

99 Flashcards

Source URL: https://quizplus.com/quiz/75173

Sample Questions

Q1) You are creating a Motorcycle class which is supposed to inherit from the Vehicle class. Which of the following class declaration statements will accomplish this?

A) public class Motorcycle inherits Vehicle

B) public class Motorcycle implements Vehicle

C) public class Motorcycle interfaces Vehicle

D) public class Motorcycle extends Vehicle

Q2) Which of the following statements about classes is true?

A) You can create an object from a concrete class, but not from an abstract class.

B) You can create an object from an abstract class, but not from a concrete class.

C) You cannot have an object reference whose type is an abstract class.

D) You cannot create subclasses from abstract classes.

Q3) Which of the following statements about an interface is true?

A) An interface has methods and instance variables.

B) An interface has methods but no instance variables.

C) An interface has neither methods nor instance variables.

D) An interface has instance variables but no methods.

To view all questions and flashcards with answers, click on the resource link above.

11

Chapter 10: Graphical User Interfaces

Available Study Resources on Quizplus for this Chatper

54 Verified Questions

54 Flashcards

Source URL: https://quizplus.com/quiz/75174

Sample Questions

Q1) User-interface components are arranged by placing them inside ____________________.

A) Swing components

B) borders

C) JPanels

D) containers

Q2) Which container is used to group multiple user-interface components together?

A) text area

B) table

C) panel

D) rectangle

Q3) Consider the following code snippet:

JFrame frame = new JFrame();

JPanel panel = new JPanel();

Which statement would add the panel to the frame?

A) frame.add(panel);

B) frame.add(JPanel panel);

C) frame.addComponent(panel);

D) frame.addComponent(JPanel panel);

To view all questions and flashcards with answers, click on the resource link above.

Page 12

Chapter 11: Advanced User Interfaces

Available Study Resources on Quizplus for this Chatper

91 Verified Questions

91 Flashcards

Source URL: https://quizplus.com/quiz/75175

Sample Questions

Q1) What is the container for top-level menu items?

A) menu bar

B) menu item

C) menu GUI

D) top level menus don't use containers

Q2) What does the MouseAdapter class provide?

A) The MouseAdapter class implements all of the methods of the MouseListener interface as do nothing methods.

B) The MouseAdapter class allows your program to accept input from multiple mice.

C) The MouseAdapter class implements all of the methods of the ActionListener interface as do nothing methods.

D) A class can implement the MouseAdapter class to handle mouse events.

Q3) What type of object can be added into a JComboBox by the addItem method?

A) Object

B) String

C) JRadioButton

D) any non-primitive type

To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Object-Oriented Design

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75176

Sample Questions

Q1) When designing classes, if you find classes with common behavior you should ____.

A) Combine them all into a single class.

B) Place the common behavior into a superclass.

C) Place the common behavior into a subclass.

D) Give them similar names.

Q2) Consider the following code snippet: Public class PowerBoat extends Vessel

{ Private Engine[] engines; ) . . }

This code is best described as an example of ____.

A) Inheritance and multiplicities.

B) Aggregation and association.

C) Inheritance and aggregation.

D) Inheritance and dependency.

To view all questions and flashcards with answers, click on the resource link above.

Chapter 13: Recursion

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75177

Sample Questions

Q1) Why does the best recursive method usually run slightly slower than its iterative counterpart?

A) Testing the terminating condition takes longer.

B) Each recursive method call takes processor time.

C) Multiple recursive cases must be considered.

D) Checking multiple terminating conditions take more processor time.

Q2) If recursion does not have a special terminating case, what error will occur?

A) Index out of range

B) Illegal argument

C) Stack overflow

D) Out of memory

Q3) Which of the following strings is a palindrome?

A) "Test"

B) "B"

C) "canal"

D) "salami"

To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Sorting and Searching

Available Study Resources on Quizplus for this Chatper

99 Verified Questions

99 Flashcards

Source URL: https://quizplus.com/quiz/75178

Sample Questions

Q1) Which sort algorithm starts by partitioning the array and selecting a pivot element?

A) merge sort

B) quicksort

C) selection sort

D) insertion sort

Q2) Which of the following completes the selection sort method minimumPosition()?

Private static int minimumPosition(int[] a, int from)

{ Int minPos = from;

For (int i = from + 1; i < a.length; i++)

{ } Return minPos; }

A) if (a[i] > a[minPos]) { minPos = i; }

B) if (a[i] < a[minPos]) { minPos = i; }

C) if (a[i] < a[j]) { minPos = i; }

D) if (a[i] < a[minPos]) { i = minPos; }

To view all questions and flashcards with answers, click on the resource link above.

16

Chapter 15: The Java Collections Framework

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75179

Sample Questions

Q1) Which of the following statements about a priority queue structure is correct?

A) It uses a FIFO discipline.

B) New items must be inserted at the end of the queue.

C) Elements must be removed in priority order.

D) It uses a LIFO discipline.

Q2) You need to access values in objects by a key that is not part of the object. Which collection type should you use?

A) Map

B) Hashtable

C) ArrayList

D) Queue

Q3) What operation is least efficient in a LinkedList?

A) Adding an element in a position that has already been located.

B) Linear traversal step.

C) Removing an element when the element's position has already been located.

D) Random access of an element.

To view all questions and flashcards with answers, click on the resource link above.

17

Chapter 16: Basic Data Structures

Available Study Resources on Quizplus for this Chatper

94 Verified Questions

94 Flashcards

Source URL: https://quizplus.com/quiz/75180

Sample Questions

Q1) A doubly-linked list requires that each node maintain two references, one to the next node and one to the previous node. Which of the following statements about a doubly-linked list is NOT correct?

A) If a node's next reference is null, it is at the end of the list.

B) To remove a node in the middle of the list, the previous node's next reference must be updated.

C) To add a node in the middle of the list, you must update the next reference of the node after which the new node will be added.

D) To remove a node in the middle of the list, the previous node's previous reference must be updated.

Q2) You have implemented a queue as a singly-linked list, adding elements at the end and removing elements at the front. What is the cost of the remove operation?

A) O(log(n))

B) O(n)

C) O(n<sup>2</sup>)

D) O(1)

To view all questions and flashcards with answers, click on the resource link above.

18

Chapter 17: Tree Structures

Available Study Resources on Quizplus for this Chatper

100 Verified Questions

100 Flashcards

Source URL: https://quizplus.com/quiz/75181

Sample Questions

Q1) If the postorder traversal visits the nodes of a binary tree storing character values in the order of U, G, T, R, A, I, what is the value of the root of the tree?

A) I

B) U

C) T

D) cannot be determined

Q2) Which action(s) will invalidate a min-heap so that, it may no longer have the properties of a min-heap?

I change the value of the root node

II remove the lowest level, right-most node

III remove the lowest level, left-most node

A) III

B) I and II

C) II and III

D) I and III

To view all questions and flashcards with answers, click on the resource link above.

19

Chapter 18: Generic Classes

Available Study Resources on Quizplus for this Chatper

78 Verified Questions

78 Flashcards

Source URL: https://quizplus.com/quiz/75182

Sample Questions

Q1) Which of the following statements about generic programming is NOT correct?

A) Type parameters can be instantiated with class types.

B) Type parameters can be instantiated with interface types.

C) Type parameters can be instantiated with primitive data types.

D) Type parameters can be instantiated with wrapper class types.

Q2) Which of the following is not a wildcard type?

A) \(?\)

B) \(?\) super B

C) \(?\) sub B

D) \(?\) extends B

Q3) Generics limit Java code somewhat. Which of the following are considered limitations of generic code?

I cannot have an array of a generic type

II cannot have primitive type variables

III cannot construct an object of a generic type

A) I

B) II

C) III

D) I, II and III

To view all questions and flashcards with answers, click on the resource link above.

Page 20

Chapter 19: Streams and Binary Inputoutput

Available Study Resources on Quizplus for this Chatper

82 Verified Questions

82 Flashcards

Source URL: https://quizplus.com/quiz/75183

Sample Questions

Q1) Which class is used for input of text data?

A) Reader

B) Writer

C) InputStream

D) OutputStream

Q2) Assume we have a RandomAccessFile object, file, which stores a set of records of class MyData, each needing MyData.RECORD_SIZE bytes for storage. If the file pointer is currently on the 24<sup>th</sup> record, which expression gets to the offset of the beginning of the 25<sup>th</sup> record?

A) MyData.RECORD_SIZE + 1

B) MyData.RECORD_SIZE + file.getFilePointer()

C) MyData.RECORD_SIZE * 2

D) file.getFilePointer()

Q3) In ____________ file access, the file is processed starting from the beginning.

A) random

B) serial

C) sequential

D) binary

To view all questions and flashcards with answers, click on the resource link above.

Chapter 20: Multithreading

Available Study Resources on Quizplus for this Chatper

82 Verified Questions

82 Flashcards

Source URL: https://quizplus.com/quiz/75184

Sample Questions

Q1) Stale data occurs in multi-CPU machines when one thread modifies shared data and a second thread accesses that data later, but sees the data value before the change took place. What is required to guarantee that the second thread sees the updated data, not stale data when access to the shared data occurs in two different methods?

A) One method needs to acquire then release the lock after modifying the data.

B) Both methods need to acquire then release the lock after modifying or reading the data.

C) Never change any shared object data in multi-CPU machines.

D) Never use locks for any shared data in multi-CPU machines.

Q2) The Runnable interface has a single method called ____________.

A) run

B) start

C) sleep

D) wait

Q3) Each thread runs for a short amount of time, called a ____________________.

A) thread allotment

B) thread time slot

C) time slice

D) run time slice

To view all questions and flashcards with answers, click on the resource link above. Page 22

Chapter 21: Internet Networking

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/75185

Sample Questions

Q1) If your data gets lost or garbled during transmission from one computer to another, what is responsible for ensuring that the recipient is aware of the unfortunate fact and does not rely on incomplete data?

A) TCP

B) IP

C) HTTP

D) DNS

Q2) A page not found has status code _______________.

A) 200 not found.

B) 404 not found.

C) 0 not found.

D) 100 not found.

Q3) To retrieve the response code from a URLConnection object, you need __________________.

A) to cast the HttpURLConnection object to the URLConnect subclass.

B) to cast the URLConnection object to the HttpURLConnect subclass.

C) to use the getInputStream() method.

D) to use the getCodeResponse() method.

To view all questions and flashcards with answers, click on the resource link above. Page 23

Chapter 22: Relational Databases

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

Source URL: https://quizplus.com/quiz/75186

Sample Questions

Q1) What does the following statement do?

String prodCode = nextLine(in, "Product Code (D=Done, L=List)");

A) It will store the string "Product Code (D=Done, L=List)" in the variable in.

B) It will display "in, Product Code (D=Done, L=List)" on the screen.

C) It will display the contents of the variable in on the screen.

D) It will read the user's input and store it in the object prodCode.

Q2) In jdbc.URL, the acronym URL stands for:

A) Universal Resource Locator

B) Uniform Resource Locator

C) Universe Resultset Locator

D) Uniform Resultset Locator

Q3) To fetch a column in a result set that stores the number of children, use the ______ method.

A) nextInt()

B) getInt()

C) nextDouble()

D) getDouble()

To view all questions and flashcards with answers, click on the resource link above.

Chapter 23: XML

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/75187

Sample Questions

Q1) Where is the createElement method located?

A) DocumentBuilder class.

B) newBuilder class.

C) DocumentBuilder interface.

D) Document interface.

Q2) Using the grammar notation in your textbook, the expression &lt;article&gt; ::= a means:

A) "article must be equal to a"

B) "article can be replaced with a or not a"

C) "article can be replaced with a"

D) "article cannot be equal to"

Q3) In XML, ___________ refers to any sequence of character data and elements.

A) ASCII characters

B) EBCIDC

C) mixed elements

D) mixed content

To view all questions and flashcards with answers, click on the resource link above. Page 25

Chapter 24: Web Applications

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/75188

Sample Questions

Q1) Which of the following contains a method expression?

A) &lt;h:outputText value="#{zone.time}" /&gt;

B) &lt;h:commandButton value="Submit" action="#{timeZoneBean.checkCity}"/&gt;

C) &lt;h:inputText value="#{zone.city}" /&gt;

D) &lt;h:body&gt; ... &lt;/h:body&gt;

Q2) What does the value expression timeBean.time do?

A) Sets the timeBean.time instance variable.

B) Calls the timeBean.setTime method

C) Calls the timeBean.getTime method

D) Creates an input field called time.

Q3) The user interface of a web application is called:

A) Swings

B) presentation logic

C) business logic

D) XML

Q4) ____ support the separation of presentation and business logic.

A) Session expressions

B) Application expressions

C) Value expressions

D) Method expressions

To view all questions and flashcards with answers, click on the resource link above. Page 26

Turn static files into dynamic content formats.

Create a flipbook