Skip to main content

Introduction to Software Engineering Final Exam Questions - 2169 Verified Questions

Page 1


Introduction to Software Engineering

Final Exam Questions

Course Introduction

Introduction to Software Engineering provides students with a foundational understanding of the principles, methods, and tools used in the systematic development of software systems. The course covers the software development lifecycle, including requirements analysis, design, implementation, testing, and maintenance. Emphasis is placed on key concepts such as software process models, project management, quality assurance, and team collaboration. Through a combination of theoretical knowledge and practical exercises, students gain skills in problem-solving, documentation, and the use of industry-standard development environments, preparing them for advanced study or careers in software development.

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) What is a logic error?

A) An error that occurs when a program is running because, for example, the wrong operator was used.

B) An error in a statement that does not conform to the syntax of the programming language.

C) An error in the hardware from overheating.

D) An error introduced by the compiler when it guesses at how to fix a syntax error.

Answer: A

Q2) The source code for a Java program is stored in a file

A) that ends with a .class suffix

B) that can have any valid file name

C) that ends with a .java suffix

D) that has no suffix

Answer: C

To view all questions and flashcards with answers, click on the resource link above. Page 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) Assuming that the user enters 45 and 62 as inputs for n1 and n2, respectively, what is the output of the following code snippet?

Public static void main(String[] args)

{ System.out.print("Enter a number: "); Scanner in = new Scanner(System.in);

String n1 = in.next();

System.out.print("Enter another number: ");

String n2 = in.next();

String result = n1 + n2; System.out.print(result);

}

A) 46

B) 4662

C) 107

D) 4562

Answer: D

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

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) Which of the following statements can be used to validate that the user input for the floor variable is between 0 and 20 inclusive?

A) if (floor >= 0 && floor <= 20)

B) if (floor >= 0 || floor <= 20)

C) if (floor <= 0 && floor >= 20)

D) if (floor <= 0 || floor >= 20)

Answer: A

Q2) Which of the following expressions represents a legal way of checking whether a value assigned to the num variable falls in the range 100 to 200?

A) if (num >= 200 && num <= 100)

B) if (num >= 100 && num <= 200)

C) if (num >= 100 || num <= 200)

D) if (num >= 200 || num <= 100)

Answer: B

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) A loop inside another loop is called:

A) A sentinel loop

B) A nested loop

C) A parallel loop

D) A do/while loop

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

Int i = 1;

Int sum = 0;

While (i <= 15)

{ Sum = sum + i;

I++;

}

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

A) The value of sum is 0

B) The value of sum is 105

C) The value of sum is 120

D) The value of sum is 136

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) Why is hand-tracing, or manually walking through the execution of a method, helpful?

A) It is an effective way to understand a method's subtle aspects

B) It guarantees that the method will compile without errors

C) It makes unit testing unnecessary

D) It enforces the "black-box" concept of method design

Q2) Given the method below, what is the output of the method call is div(10)?

Public static void div(int n)

{ If (n > 2)

{ Div(n % 3);

} System.out.print(n / 3 + " ");

}

A) 0 10

B) 3

C) 0 3

D) 10

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) Which statements about the enhanced for loop are true?

I. It is suitable for all array algorithms

II. It does not allow the contents of the array to be modified

III. It does not require the use of an index variable

A) I, II

B) I, III

C) II, III

D) I, II, III

Q2) Consider the following code snippet in Java 6 or later:

String[] data = { "abc", "def", "ghi", "jkl" };

String[] data2 = Arrays.copyOf(data, data.length - 1); What does the last element of data2 contain?

A) "abc"

B) "def"

C) "ghi"

D) "jkl"

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) Consider the following code snippet: Scanner in = new Scanner(. . .); In)useDelimiter("[A-Za-z]+");

What characters will be read in using this code?

A) Only alphabetic characters will be read in.

B) Only numeric characters will be read in.

C) Only non-alphabetic characters will be read in.

D) Only non-numeric characters will be read in.

Q2) Which of the following statements about exception handling is correct?

A) Statements that may cause an exception should be placed within a catch block.

B) The main method of a Java program will handle any error encountered in the program.

C) Statements that may cause an exception should be placed within a throws block.

D) Statements that may cause an exception should be placed within a try block.

Q3) The PrintWriter class is an enhancement of the ____ class.

A) Scanner

B) ReadStream

C) PrintStream

D) File

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) You have created a Student class. You wish to have a unique, sequential student number assigned to each new Student object that is created. Which of the following declarations, if added to the Student class, would allow you to determine which number was last assigned when you are creating a new Student object?

A) private static int lastAssignedStudentNum = 1500;

B) public int lastAssignedStudentNum = 1500;

C) private int lastAssignedStudentNum = 1500;

D) public static int lastAssignedStudentNum = 1500;

Q2) 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

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

A) add

B) create

C) new

D) construct

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) Consider the following code snippet: Public class BankAccount implements Comparable&lt;BankAccount&gt;

{ . . .

Public int compareTo(T other)

{ What is wrong with this code?

A) The type parameter for the Comparable interface in the implements clause must be the same as the implementing class.

B) The type parameter for the Comparable interface in the implements clause must be the generic &lt;T&gt;.

C) The type parameter for the compareTo method must be the same as the implementing class.

D) The type parameter for the compareTo interface must be the generic &lt;T&gt;.

Q2) To create a subclass, use the ____ keyword.

A) inherits

B) implements

C) interface

D) extends

To view all questions and flashcards with answers, click on the resource link above. Page 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) To associate an event listener with a JButton component, you must use the ___ method of the JButton class.

A) addEventListener

B) addActionListener

C) addButtonListener

D) addListener

Q2) When drawing complex shapes, make a separate class for each part and provide a(n) ___ method that draws the shape.

A) draw

B) add

C) sketch

D) outline

Q3) The methods of a/an ____ describe the actions to be taken when an event occurs.

A) event source

B) event listener

C) event interface

D) action source

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

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) For a new programmer using the Swing JSlider component for the first time, which of these is the least important thing to know?

A) a basic way to construct a JSlider

B) what type of events it generates

C) how to write the BoundedRangeModel constructor

D) its value when an event occurs

Q2) What type does the method getSelectedItem in the JComboBox class return?

A) Object

B) String

C) JRadioButton

D) JLabel

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.

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) If you do not include a package statement at the top of your class source file, its classes will be placed in which package?

A) java.lang

B) java.util

C) the default package, which has no name

D) java.awt

Q2) A UML class diagram would be most useful in visually illustrating which of the following?

A) the cohesiveness of a class's interface.

B) the amount of complexity of a class's interface.

C) dependencies between classes.

D) relationships between classes and their interfaces.

Q3) After you have identified a set of classes needed for a program, you should now ____.

A) Define the behavior of each class.

B) Look for nouns that describe the tasks.

C) Begin writing the code for the classes.

D) Establish the relationships between the classes.

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

14

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) Which of the following statements about recursion is correct?

A) It is not necessary to have a special terminating case in all recursions.

B) It is not necessary to simplify the argument in the recursive call.

C) A recursive solution will always run faster than an equivalent iterative solution.

D) In many cases, a recursive solution will be easier to understand and to implement than an iterative solution.

Q2) Which of the following options could be used as a terminating condition for a recursive method that finds the middle character of a String with any number of characters?

I the length of the String is 1

II first and last String characters match

III the String is not empty

A) I

B) II

C) I, II and III

D) I and III

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

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) A binary search is generally ____ a linear search.

A) slower than B) equal to C) less efficient than D) faster than

Q2) After 5 iterations of selection sort working on an array of 10 elements, what must hold true?

A) 5 more iterations are always necessary to complete the sort

B) 4 more iterations are always necessary to complete the sort

C) 5 more iterations may be needed to complete the sort

D) 4 more iterations may be needed to complete the sort

Q3) In the worst case, quicksort is a(n) ____ algorithm.

A) O(n)

B) O(log(n))

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

D) O(n log n)

To view all questions and flashcards with answers, click on the resource link above. Page 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) Consider the following code snippet: LinkedList&lt;String&gt; words = new LinkedList&lt;String&gt;(); Words.addLast("abc"); Words.addLast("def"); Words.addLast("ghi"); System.out.print(words.removeLast()); System.out.print(words.removeFirst()); System.out.print(words.removeLast());

What will this code print when it is executed?

A) abcdefghi

B) ghiabcdef

C) abcghidef

D) defghiabc

Q2) Which of the following statements about manipulating objects in a map is NOT correct?

A) Use the add method to add a new element to the map.

B) Use the get method to retrieve a value from the map.

C) Use the keyset method to get the set of keys for the map.

D) Use the remove method to remove a value from the map.

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) Complete the following code snippet, which is intended to compress a hash code to become a valid array index:

Int h = x.hashCode();

If (h < 0) { h = -h; }

A) position = arrayLength % h;

B) position = arrayLength / h;

C) position = h / arrayLength;

D) position = h % arrayLength;

Q2) Which Java package contains the LinkedList class?

A) java.lang

B) java.util

C) java.collections

D) java.io

Q3) Elements in a hash table are said to ____ when they have the same hash code value.

A) be equivalent

B) compress

C) collide

D) buffer well

To view all questions and flashcards with answers, click on the resource link above. Page 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) What is the efficiency of adding an element to a red-black tree?

A) O(n)

B) O(log (n))

C) O(1)

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

Q3) What is the efficiency of the heapsort algorithm?

A) O(1)

B) O(log (n))

C) O(n log (n))

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

To view all questions and flashcards with answers, click on the resource link above. Page 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 argument type cannot passed to generic methods?

I Object

II GUI components

III primitive

A) I

B) II

C) III

D) I and III

Q2) To maintain compatibility with pre-generic Java, type parameters are replaced by ordinary types called ____.

A) primitives

B) raw types

C) Object

D) generics

Q3) Which of the following satisfies the wildcard ? extends Component?

A) String

B) Scanner

C) JButton

D) Color

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) Given a RandomAccessFile that stores a set of records of class MyData, each needing MyData.RECORD_SIZE bytes for storage, which expression gets the offset to the beginning of the 25<sup>th</sup> record?

A) MyData.RECORD_SIZE * 25

B) MyData.RECORD_SIZE * 24

C) MyData.RECORD_SIZE++

D) MyData.RECORD_SIZE + 25

Q2) In Java, the byte type is a(n) ____ type.

A) positive

B) signed

C) negative

D) unsigned

Q3) To read text data from a disk file, you should create a(n) ____________________ object.

A) Scanner

B) PrintWriter

C) InputStream

D) OutputStream

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) What happens when a thread calls the signalAll method of a Condition object connected to a lock, if no other thread had called await on that Condition object?

A) A compiler error.

B) A checked exception is thrown.

C) The unlock method call will block.

D) Nothing, the program executes normally.

Q2) ____ allow a thread to temporarily release a lock, so that another thread can proceed, and to regain the lock at a later time.

A) Condition objects

B) Embedded systems

C) Exceptions

D) Race conditions

Q3) The ________ method stops the current thread for a given number of milliseconds.

A) run

B) await

C) sleep

D) delay

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

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) ____ has built-in provisions for retrying incomplete transmissions.

A) TCP

B) IP

C) DNS

D) HTTP

Q2) Which of the following protocols is used to send email messages?

A) POP

B) IP

C) SMTP

D) TCP

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) To get the number of columns in a result set, you use _________ method of the ResultSetMetaData class.

A) getColumnInt()

B) getColumnsCount()

C) getCount()

D) getColumnCount()

Q2) Which SQL command(s) modify the data in a database?

I SELECT

II INSERT

III DELETE

IV UPDATE

A) I, II, III

B) II, III

C) II, III, IV

D) III, IV

Q3) The outcome of a SELECT query is a _________ that you can view and analyze.

A) table

B) list

C) result set

D) subquery

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

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) In an attribute definition in a DTD, a #REQUIRED declaration means ____________.

A) the attribute is valid.

B) the attribute is required.

C) the attribute is optional.

D) the attribute is implied.

Q2) What kind of object do you need to create a new, empty XML document?

A) DocumentBuilder

B) newBuilder

C) newInstance

D) newDocumentBuilder

Q3) Which of the following statements is correct?

A) Elements cannot have attributes.

B) An XML document starts out with an HTML declaration and contains elements and text.

C) An element must contain text or elements, not both.

D) An attribute is appropriate only if it tells something about the data but is not part of the data itself.

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

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) The Java library contains a _______ class that provides information about time zones around the world.

A) Time

B) Zone

C) TimeDate

D) TimeZone

Q2) With GlassFish, the default deployment directory is called:

A) domains/deploy

B) domains/domain1/deploy

C) domains/autodeploy

D) domains/domain1/autodeploy

Q3) The string that determines the next page that the JSF container sends to the browser is called the __________________.

A) bean navigator

B) outcome string

C) JavaBean result

D) HTML string

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

26

Turn static files into dynamic content formats.

Create a flipbook
Introduction to Software Engineering Final Exam Questions - 2169 Verified Questions by Quizplus - Issuu