Skip to main content

Fundamentals of Software Engineering Pre-Test Questions - 2169 Verified Questions

Page 1


Fundamentals of Software Engineering Pre-Test Questions

Course Introduction

Fundamentals of Software Engineering introduces the essential principles, methodologies, and tools used in the development of reliable, efficient, and maintainable software systems. The course covers the software development lifecycle, including requirements analysis, software design, implementation, testing, and maintenance. Students will explore key concepts such as software process models, project management, design patterns, software quality assurance, and documentation. Practical exercises and case studies provide hands-on experience with real-world software engineering challenges, preparing students to contribute effectively to software development projects.

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) Which of the following statements is true with respect to the main method in Java?

A) The opening and closing parentheses after the method name main are optional.

B) A semicolon is required after the statement public static void main()

C) A semicolon is required after the closing curly braces in the main method.

D) Every Java application must have a main method.

Answer: D

Q2) Java is said to be a "safe" programming language. What does this mean?

A) Java programs cannot cause environmental damage because they are "green".

B) Java programs can run within a browser without fear that they may attack your computer.

C) There is no way for a Java program to read or write a file.

D) Java programs cannot access data across a computer network.

Answer: B

Q3) Which of the following symbols is used to terminate a Java program statement?

A) Colon

B) Semicolon

C) Single quote

D) Period

Answer: B

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) What does the following statement sequence print?

String str = "Harry";

Int n = str.length();

String mystery = str.substring(0, 1) + str.substring(n - 2, n);

System.out.println(mystery);

A) Ha

B) Har

C) Hy

D) Hry

Answer: D

Q2) Which one of the following statements gives the absolute value of the floating-point number x = -25.50?

A) abs(x);

B) Math.abs(x);

C) x.abs();

D) x.absolute();

Answer: B

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) What is the value of the price variable after the following code snippet is executed?

Int price = 42;

If (price < 40) { Price = price + 10;

If (price > 30)

Price = price * 2;

If (price < 100)

Price = price - 20;

A) 42

B) 52

C) 84

D) 64

Answer: D

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 code snippet given below?

String s = "aeiou";

Int i = 0; Do { System.out.print); I++;

If (i >= 3) { I = 5;

While (i < 5);

A) a

B) ae

C) aeiou

D) aei

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) Which of the following is NOT a good practice when developing a computer program?

A) Put as many statements as possible into the main method

B) Document the purpose of each method parameter

C) Decompose a program into many small methods

D) Place code that is used multiple times into a separate method

Q2) What is stepwise refinement?

A) The process of unit testing

B) The process of breaking complex problems down into smaller, manageable steps

C) The design of pseudocode for black-box methods

D) The use of a temporary implementation of a method that can be improved later

Q3) Which statement about the steps for implementing a method is true?

A) Pseudocode is the first step in the process for implementing a method

B) Pseudocode is the last step in the process for implementing a method

C) Unit testing (testing in isolation) of the implemented method is an important first step

D) Unit testing (testing in isolation) of the implemented method is an important final step

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

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 one of the following is a valid signature of a method with an integer two-dimensional array parameter of size 10 x 10?

A) public static void func(int[][] arr)

B) public static void func(int[10][] arr)

C) public static void func(int[][10] arr)

D) public static void func(int[10][10] arr)

Q2) Consider the following code snippet:

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

String [] data2;

In Java 6 and later, which statement copies the data array to the data2 array?

A) data2 = Arrays.copyOf(data, data2.length);

B) data2 = Arrays.copyOf(data, data.length);

C) data2 = Arrays.copyOf(data, data.size());

D) data2 = Arrays.copyOf(data);

Q3) Java 7 introduced enhanced syntax for declaring array lists, which is termed

A) angle brackets.

B) method lists.

C) diamond syntax.

D) symmetric slants.

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

Page 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 read floating-point numbers from a text file.

Scanner in = new Scanner(. . .); While (____________)

{

Double hoursWorked = in.nextDouble(); System.out.println(hoursWorked);

}

A) in.getNextDouble()

B) in.peek()

C) in.hasNextDouble()

D) in.readNextWord()

Q2) Your program must read in an existing text file. You want the program to terminate if any exception related to the file occurs. Which of the following indicates the correct code for the main method?

A) public static void main(String[] args) throws IOException

B) public static void main(String[] args) throws FileNotFoundException

C) public static void main(String[] args)

D) public static void main(String[] args) throws UnknownFileException

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) Consider the following code snippet: Public class Employee

{ Private String empID; Private boolean hourly; Public Employee(String employeeID, boolean isHourly)

{ ) . . }

}

Which of the following statements can be used to create an object of type Employee?

A) Employee anAuto = new Employee();

B) Employee anAuto = new Employee(10548, true);

C) Employee anAuto = new Employee("10548", true);

D) Employee anAuto = new Employee(10548, "true");

Q2) You are creating a class named Vessel. Which statement correctly declares a constructor for this class?

A) public Vessel()

B) public void Vessel()

C) void Vessel()

D) new Vessel()

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 Inventory implements Measurable

{ Private int onHandCount; ) . .

Public double getMeasure();

{ Return onHandCount; } }

Why is it necessary to declare getMeasure as public?

A) All methods in a class are not public by default.

B) All methods in an interface are private by default.

C) It is necessary only to allow other classes to use this method.

D) It is not necessary to declare this method as public.

Q2) To test whether an object belongs to a particular type, use ___.

A) the this reserved word.

B) the subclassOf reserved word.

C) the instanceof operator.

D) the equals method.

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) Which container is used to group multiple user-interface components together?

A) text area

B) table

C) panel

D) rectangle

Q2) Which of the following is an event source?

A) A JButton object.

B) An event listener.

C) An inner class.

D) An event adapter.

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

A) Swing components

B) borders

C) JPanels

D) containers

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) The ____ class in the javax.swing package generates a sequence of events, spaced apart at even time intervals.

A) TimeClock

B) Timer

C) Clock

D) StopWatch

Q2) Which layout manager allows you to add components to it by invoking the container's add method with the component as the only argument to add.

I FlowLayout

II BorderLayout

III GridLayout

A) I

B) II

C) III

D) I and III

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) Which of the following code snippets denotes that the Rose class inherits from the Flower class?

A) public class Flower extends Rose

B) public class Rose extends Flower

C) public class Rose

{ Private Flower[] flowers;

}

D) public class Flower

{ Private Rose[] limes;

}

Q2) During the implementation phase, which of the following statements is true?

A) Class instance variables are available from the CRC cards.

B) Class instance variables are available from the javadocs created during the design phase.

C) You must determine the class instance variables during implementation phase.

D) Class instance variables can be determined from the UML diagrams.

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) Consider the getArea method from the textbook shown below: Public int getArea()

{ If (width <= 0) { return 0; } // line #1

Else if (width == 1) { return 1; } // line #2

Else

{ Triangle smallerTriangle = new Triangle(width - 1); // line #3

Int smallerArea = smallerTriangle.getArea(); // line #4

Return smallerArea + width; // line #5

} }

Assume the code in line #3 is changed to: Triangle smallerTriangle = new Triangle(width); This change would cause infinite recursion for which triangles?

A) Those with width equal to 0.

B) Those with width equal to 1.

C) Those with width greater than or equal to 2.

D) Triangles of any width.

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) Suppose an algorithm requires a total of 3n<sup>3</sup> + 2n<sup>2</sup> - 3n + 4 visits. In big-Oh notation, the total number of visits is of what order?

A) n<sup>2</sup> * n<sup>2</sup>

B) n<sup>2</sup>

C) n<sup>6</sup>

D) n<sup>3</sup>

Q2) Can you search the following array using binary search?

Int[] A = {6, 5, 4, 2, 0, 1, -1, -17};

A) Yes. Binary search can be applied to any array.

B) No. Binary search can be applied to a sorted array only.

C) Yes, but the algorithm runs slower because the array is in descending order.

D) No, negative numbers are not allowed because they indicate that a value is not present.

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

A) The largest element is correctly placed by default.

B) One more iteration is needed to complete the sort.

C) The smallest element is incorrectly placed.

D) The largest element is incorrectly placed.

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) Suppose we create a deque (double-ended queue) data structure. It is basically a queue, with its addLast and removeFirst operations, but we also add the addFirst and removeLast operations. If a line at the grocery store resembles a deque more than a queue, what is the most likely reason?

I the cashier is very fast

II the line is very long

III the cashier is very slow

A) I

B) II

C) I and II

D) II and III

Q2) You need to write a program to build and maintain an address book. Since the program must support the possibility of having duplicate names, which data structure would be most appropriate to model this situation?

A) map

B) stack

C) queue

D) linked list

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

Page 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) In the textbook implementation, the Node class is a private inner class of the LinkedList class. Which of the following statements regarding this implementation is NOT correct?

A) The methods of the LinkedList class can access the public features of the Node class.

B) The methods of the Node class can access the public features of the LinkedList class.

C) The methods of the Node class can be directly accessed by other classes.

D) The Node class's instance variables that represent the node element and its next node reference are declared as public.

Q2) Suppose we maintain a linked list of length n in random element order. What would be the big-Oh notation for an algorithm that prints each list element and the number of times it occurs in the list (without sorting the list)?

A) O(1)

B) O(n)

C) O(n log<sub>2</sub><sub> </sub>n)

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

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) A binary tree of height h can have up to ____ nodes.

A) 2h - 1

B) 2h + 1

C) 2<sup>h</sup> - 1

D) 2<sup>h</sup> + 1

Q2) Which of the following is NOT a property of a red-black tree?

A) All nodes must be red or black.

B) All child nodes of a red node must be black.

C) The root is black.

D) All paths from root to null have the name number of nodes.

Q3) A min-heap is a binary tree structure in which missing nodes may only occur where?

A) bottom level, left side

B) bottom level, right side

C) anywhere in the bottom two levels

D) left child of the root

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 satisfies the wildcard ? extends Object?

I String

II JComponent

III Scanner

A) I

B) II

C) I and II

D) I, II and III

Q2) What is the result when a program constructs a generic class without passing a type variable, as in the following code?

Stack stack = new Stack();

I the program will compile and run

II the compiler will issue an error

III the compiler will issue a warning

A) I

B) II

C) III

D) I 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) The readInt and writeInt methods of the RandomAccessFile class read and write integers as ____ quantities.

A) two-byte

B) four-byte

C) six-byte

D) eight-byte

Q2) Use a ____ object to access a file and move a file pointer.

A) Random

B) RandomAccess

C) RandomAccessFile

D) System.in

Q3) When constructing a Scanner from a File object, the Scanner automatically constructs a ___________.

A) InputStream

B) FileInputStream

C) FileReader

D) PrintWriter

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

21

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) The ____________ occurs when a thread that is not running is interrupted.

A) InterruptException

B) InterruptedException

C) ThreadException

D) ThreadTerminatedException

Q2) Suppose thread one is downloading a 800KB file while another thread is processing the same file on a single CPU machine. Suppose further that one time slice allows the first thread to download about 10KB and that the second thread can process 10KB of the file in one time slice. How many total time slices will it take to see the first 10KB of the processed file?

A) one

B) two

C) eight

D) ten

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. 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) A thread dies ______________

A) when the client quits or disconnects.

B) when the run method exits.

C) when the client quits or disconnects and/or when the run method exits.

D) the thread runs forever in the background.

Q2) A print writer buffers the characters that you send to it. To make sure that the server gets a complete request at a time, you need to ________ the buffer.

A) print

B) send

C) scan

D) flush

Q3) The ____________ has one function, to attempt to deliver data from one computer to another across the Internet.

A) TCP/IP

B) IP

C) HTTP

D) DNS

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) Which of the following would be a good primary key for a Course table designed to hold course information for a university?

A) CourseName

B) CourseID

C) CourseCredit

D) CoursePrerequisites

Q2) In database terminology, a column (or combination of columns) that uniquely identifies a row in a table is called a(n) ____.

A) data type

B) attribute

C) primary key

D) column header

Q3) When you close a connection:

A) it closes the connection only.

B) it closes the connection and the associated result set.

C) it closes the connection and the associated statement.

D) it closes the connection and closes all statements and result sets.

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) What does DOM stand for?

A) Data Object Model

B) Data Oriented Model

C) Document Object Model

D) Definition Object Model

Q2) To insert text, you need the _________methods.

A) insertElement and setElement

B) createNode and insertChild

C) createTextNode and appendChild

D) insertTextNode and insertChild

Q3) A number of useful advanced XML technologies have been standardized. Among them is:

A) HTML

B) HXML

C) XHTML

D) W3C

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

Q2) When deploying a JSF application, all class files must be placed in the _______ directory:

A) WEB-BEAN/classes/

B) BEAN-INF/classes/

C) WEB/INF/classes/

D) WEB-INF/classes/

Q3) ____ link JSF pages with Java objects.

A) JavaBeans

B) Browsers

C) Value expressions

D) Session bindings

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