Skip to main content

Object-Oriented Programming Solved Exam Questions - 1353 Verified Questions

Page 1


Object-Oriented Programming Solved Exam Questions

Course Introduction

Object-Oriented Programming introduces the fundamental concepts and principles of object-oriented design and development. The course covers topics such as classes, objects, inheritance, polymorphism, encapsulation, and abstraction, with a focus on applying these concepts using programming languages like Java or C++. Students will learn how to design modular and reusable software systems, implement relationships between objects, and utilize standard libraries. Through hands-on assignments and projects, students will develop practical programming skills and gain experience in solving real-world problems using the object-oriented paradigm.

Recommended Textbook

Visual C# How to Program 6th Edition by Paul J. Deitel

Available Study Resources on Quizplus

25 Chapters

1353 Verified Questions

1353 Flashcards

Source URL: https://quizplus.com/study-set/2449 Page 2

Chapter 1: Introduction to Computers, the Internet and Visual C#

Available Study Resources on Quizplus for this Chatper

49 Verified Questions

49 Flashcards

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

Sample Questions

Q1) Web-based applications can be distrib uted to a great variety of devices from cell phones to desktop computers using theNET platform.

A)True

B)False

Answer: True

Q2) Every computer can be divided into 6 basic units.They are:

A) monitor, mouse, keyboard, hard drive, processor and disk drives.

B) input, output, primary storage, secondary storage, memory and ALU.

C) input, output, memory, ALU, CPU and secondary storage.

D) input, output, primary storage, secondary storage, CPU, memory.

Answer: C

Q3) C++ "spruces up" C with object-oriented programming capabilities.

A)True

B)False

Answer: True

Q4) Logical decisions are made by the CPU.

A)True

B)False

Answer: False

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

Chapter 2: Dive Into Visual Studio Community

Available Study Resources on Quizplus for this Chatper

25 Verified Questions

25 Flashcards

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

Sample Questions

Q1) A is a window used to communicate with users.

A) form

B) control

C) dialog

D) None of the above.

Answer: C

Q2) The Solution Explorer window provides access only to certain files in the solution.

A)True

B)False

Answer: False

Q3) Dragging and dropping predefined building blocks into place is part of visual programming in C#.

A)True

B)False

Answer: True

Q4) Autohide enables the tool box to shrink down to the edge of the screen.

A)True

B)False

Answer: True

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

Chapter 3: Introduction to C# Apps

Available Study Resources on Quizplus for this Chatper

41 Verified Questions

41 Flashcards

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

Sample Questions

Q1) Only some C# programs contain class definitions.

A)True

B)False Answer: False

Q2) The fractional part in integer division is stored in a variable declared automat ically at run-time.

A)True

B)False Answer: False

Q3) A single line comment in C# begins with:

A) */

B) #

C) //

D) \\ Answer: C

Q4) "\" is known as an escape sequence.

A)True

B)False Answer: False

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

Chapter 4: Introduction to Classes,Objects,Methods and Strings

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

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

Sample Questions

Q1) Type ________ is designed to precisely represent numbers with decimal points,especially monetary amounts.

A) digit

B) decimal

C) float

D) double

Q2) The Windows culture settings on the user's machine determine the format for displaying currency amounts,such as the commas vs.periods for separating thousands,millions,etc.

A)True

B)False

Q3) You should think of a C# class's attributes as instance variables.

A)True

B)False

Q4) Method ReadLine reads a whole line,including all the characters the user types up to and including the newline that the user typed by pressing Enter.

A)True

B)False

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

Chapter 5: Control Statements: Part 1

Available Study Resources on Quizplus for this Chatper

94 Verified Questions

94 Flashcards

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

Sample Questions

Q1) Which statement is false

A) To ensure that the operands are of the same type, C# performs implicit conversion on selected operands.

B) Cast operators are unary operators.

C) Cast operators associate from right to left and are one level lower than the multiplicative operators.

D) Cast operators are formed by placing parentheses around the name of a type.

Q2) Which of the following terms is not used to refer to a sentinel value that breaks out of a while statement

A) signal value

B) break value

C) dummy value

D) flag value

Q3) is C#'s only ternary operator.

A) *

B)\(?:\)

C) =

D) //

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

Chapter 6: Control Statements: Part 2

Available Study Resources on Quizplus for this Chatper

66 Verified Questions

66 Flashcards

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

Sample Questions

Q1) Which of the following statements about the continue statement is true

A) The continue statement is used to exit a repetition statement early and continue execution after the loop.

B) The continue statement is used to continue after a switch statement.

C) The continue statement does not alter the flow of control.

D) A continue statement proceeds with the next iteration of the immediately enclosing while, for, do while statement.

Q2) Only the statements for one case can be executed in any one execution of a switch statement.

A)True

B)False

Q3) Counting loops should be controlled with whatever data type most closely reflects the operations taking place,whether that is an int,float or double.

A)True

B)False

Q4) The && operator has higher precedence than the || operator.

A)True

B)False

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

Chapter 7: Methods: a Deeper Look

Available Study Resources on Quizplus for this Chatper

95 Verified Questions

95 Flashcards

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

Sample Questions

Q1) The Math class provides only methods.

A)True

B)False

Q2) To compare a simple-type value to the underlying value of an enumeration constant,you must use a cast operator to make the two types match.

A)True

B)False

Q3) To access the class's non-static members,a static method must use a reference to an object of the class.

A)True

B)False

Q4) A recursive method knows directly how to solve only the base case.

A)True

B)False

Q5) Methods can return at most one value.

A)True

B)False

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

Chapter 8: Arrays;Introduction to Exception Handling

Available Study Resources on Quizplus for this Chatper

90 Verified Questions

90 Flashcards

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

Sample Questions

Q1) The first element in every array is the 0th element.

A)True

B)False

Q2) The index of an array must be an integer;it cannot include variables or expres sions.

A)True

B)False

Q3) By convention,the first set of brackets of a two-dimensional array identifies an element's column and the second identifies the row.

A)True

B)False

Q4) The params modifier can be used anywhere in the method's header.

A)True

B)False

Q5) Which of the following correctly declares and initializes a two-dimensional rectangular array of integers

A) int[,] sum = new int[3, 4];

B) int[] sum = new int[2, 4];

C) int sum[] = new int[2, 2];

D) None of the above.

10

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

Chapter 9: Introduction to Linq and Generic Collections

Available Study Resources on Quizplus for this Chatper

27 Verified Questions

27 Flashcards

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

Sample Questions

Q1) The international standard for querying relational databases is called:

A) XML

B) SQL

C) HTTP

D) LINQ

Q2) LINQ is used to query collections in the same way it's used to query arrays.

A)True

B)False

Q3) You can sort a LINQ query's results only by one property.

A)True

B)False

Q4) TheNET collection classes provide flexible,efficient alternatives to arrays.

A)True

B)False

Q5) The results of a LINQ query can have only the same type as the data being queried-for example,a LINQ query on a collection of Employee objects will always have Employee objects in the results.

A)True

B)False

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

Chapter 10: Classes and Objects: A Deeper Look

Available Study Resources on Quizplus for this Chatper

79 Verified Questions

79 Flashcards

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

Sample Questions

Q1) You cannot validate values assigned to properties using an object initializer.

A)True

B)False

Q2) displays the variables and methods for all classes in a project.

A) Class View

B) Object Browser

C) Design View

D) None of the above.

Q3) A class cannot have references to objects of other classes as members.

A)True

B)False

Q4) Keyword _______ is used to indicate a method overloads a specific operator.

A) implement

B) operator

C) overload

D) op

Q5) An object initializer calls the default constructor before executing.

A)True

B)False

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

Chapter 11: Object-Oriented Programming: Inheritance

Available Study Resources on Quizplus for this Chatper

51 Verified Questions

51 Flashcards

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

Sample Questions

Q1) When a derived-class member overrides a base-class member,the base-class member can be accessed from the derived-class by using the keyword

A) base

B) top

C) super

D) None of the above

Q2) The process of abstraction allows you to focus on the commonalities among objects in the system.

A)True

B)False

Q3) Base class methods with this level of access cannot be called from derived classes.

A) private

B) public

C) protected

D) package

Q4) A key to improving the software development process is encouraging soft ware reuse.

A)True

B)False

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

Chapter 12: Object-Oriented Programming: Polymorphism

Available Study Resources on Quizplus for this Chatper

62 Verified Questions

62 Flashcards

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

Sample Questions

Q1) Classes and methods are declared sealed for all of the following reasons,except:

A) sealed methods allow inlining the code.

B) sealed methods and classes prevent further inheritance.

C) sealed methods are static.

D) sealed methods can improve performance.

Q2) A class that implements an interface but does not declare all of the interface's methods must be declared:

A) public

B) interface

C) abstract

D) final

Q3) Interfaces can have methods.

A) 0

B) 1

C) 2

D) any number of

Q4) When used correctly,polymorphism will never require changes to be made to any part of the program.

A)True

B)False

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

Chapter 13: Exception Handling: A Deeper Look

Available Study Resources on Quizplus for this Chatper

58 Verified Questions

58 Flashcards

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

Sample Questions

Q1) In many cases,handling an exception allows a program to automatically restart execution of the program from the beginning.

A)True

B)False

Q2) Programmer-defined exception classes typically should contain 3 constructors:

A) a default constructor, a constructor that receives a string for the error message and a constructor that receives an Exception argument of the inner exception object

B) a default constructor, a constructor that receives a string and a constructor that receives both a string and an exception

C) a constructor that receives a string, a constructor that receives an exception and a constructor that receives both

D) a default constructor, a constructor that receives a string and a constructor that receives a number indicating the line number where the exception occurred

Q3) There must be a catch clause for every expected exception type.

A)True

B)False

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

15

Chapter 14: GUI With Windows Forms: Part 1

Available Study Resources on Quizplus for this Chatper

64 Verified Questions

64 Flashcards

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

Sample Questions

Q1) An example of software with a GUI is:

A) Windows

B) Internet Explorer

C) Visual Studio

D) All of the above

Q2) Multicast event delegates must reference methods:

A) with the same name, but a different signature

B) that should all be raised by the same event

C) defined earlier in the program

D) with different names and different signatures

Q3) In order to create an event you must click on the event icon in the properties window.

A)True

B)False

Q4) What does the ReadOnly property indicate

A)the number of the control cannot change

B)the user cannot click the buttons to select a number into the control

C)the user cannot type data into the control

D) all of the above

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

Chapter 15: GUI With Windows Forms: Part 2

Available Study Resources on Quizplus for this Chatper

73 Verified Questions

73 Flashcards

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

Sample Questions

Q1) The UseMnemonic property indicates that ampersand (&)should be interpreted as a shortcut rather than an actual character.

A)True

B)False

Q2) Which of the following statements are true about menus created through C#

A)Provide groups of related commands for Windows apps.

B)Organize commands without cluttering the GUI

C)Have the capacity to create shortcuts for the menu commands

D)All of the above

Q3) What does the DateTimePicker allow for

A)time selection

B)date selection

C)a and b

D)None of the above

Q4) The Format property specifies the user's selection options using the DateTimePickerFormat enumeration.

A)True

B)False

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

17

Chapter 16: Strings,Characters and Regular Expressions

Available Study Resources on Quizplus for this Chatper

92 Verified Questions

92 Flashcards

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

Sample Questions

Q1) If a method's arguments cause it to access an index of the string that is beyond its length,the program will retrieve whatever is in that memory location.

A)True

B)False

Q2) If a number is formatted with the D3 formatter,it means that:

A) the number has to have at least three digits even if they are zero

B) the number has a dollar sign and is at least three digits long C) creates each number in three dimensions

D) it is an error

Q3) In regular expressions,a word character is considered to be any alphanu meric character.

A)True

B)False

Q4) Method LastIndexOf is used to find the last occurrence of given text in a string.

A)True

B)False

Q5) The char,int,and double types are all defined by structs.

A)True

B)False

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

Chapter 17: Files and Streams

Available Study Resources on Quizplus for this Chatper

39 Verified Questions

39 Flashcards

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

Sample Questions

Q1) All simple-type variables and strings are serializable.

A)True

B)False

Q2) Which of the following attributes is needed to indicate to the CLR that objects of the class can be serialized

A)[Serializable]

B)[DeSerializable]

C)[Serialize]

D)both a and b

Q3) Which of the following methods of FileStream will reset the file-position pointer back to the beginning of the file

A)Reset

B) Origin

C) Seek

D) Beginning

Q4) The standard output stream object enables a program to output data to the screen.

A)True

B)False

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

Chapter 18: Searching and Sorting

Available Study Resources on Quizplus for this Chatper

19 Verified Questions

19 Flashcards

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

Sample Questions

Q1) What is the efficiency of merge sort

A) O(log n)

B) O(n)

C) O(n log n)

D) O(n2)

Q2) Which of the following sorting algorithms is the fastest when sorting a large array

A)Selection sort

B)Insertion sort

C)Merge sort

D)They all run at roughly the same speed

Q3) O(1)means that the algorithm has a constant run time.

A)True

B)False

Q4) Insertion sort is a simple and inefficient algorithm.

A)True

B)False

Q5) The Big O Notation measures the average case run time of an algorithm.

A)True

B)False

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

Chapter 19: Data Structures

Available Study Resources on Quizplus for this Chatper

28 Verified Questions

28 Flashcards

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

Sample Questions

Q1) A __________ class contains a reference member that refers to an object of the same class type.

A) self-determining

B) self-pointing

C) self-linking

D) self-referential

Q2) Which statement is false

A) Linked lists are collections of data items "lined up in a row," insertions and deletions can be made anywhere in a linked list.

B) Insertions and deletions are made only at one end of a stack, its top.

C) Insertions and deletions are made only at one end of a queue, its tail.

D) Binary trees facilitate high-speed searching and sorting of data.

Q3) Queue nodes are removed only from the __________ of the queue,and are inserted only at the __________ of the queue.

A)tail,tail

B)tail,head

C)head,tail

D)head,head

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

Chapter 20: Generics

Available Study Resources on Quizplus for this Chatper

22 Verified Questions

22 Flashcards

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

Sample Questions

Q1) If there's a constructor constraint,the type argument's class must not provide constructors.

A)True

B)False

Q2) A ________ provides a means for describing a class in a type-independent manner.

A) subclass

B) generic class

C) concrete class

D) parameterized class

Q3) A type parameter _____________.

A) is an identifier that is used in place of an actual type name

B) can be used to declare the return type

C) acts as a placeholder for the type of an argument passed to the generic method

D) All of the above

Q4) You can use explicit type arguments to indicate the exact type that should be used to call a generic method (e.g.,< int >).

A)True B)False

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

Chapter 21: Collections

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

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

Sample Questions

Q1) C# 6's using static directive ________.

A) converts each of a class's methods to static.

B) converts the class to static.

C) allows access to a class's static members without fully qualifying their names.

D) None of the above.

Q2) Which of the following is not a method provided by an array

A) Sort

B) Copy

C) BinarySearch

D) Reverse

E) None of the above

Q3) Which of the following statements is false

A) Lambda expressions allow you to define simple, anonymous methods.

B) A lambda's return type is listed to the left of the lambda.

C) A delegate can hold a reference to a lambda expression that has a signature that's compatible with the delegate type.

D) A lambda expression is called via a variable that references it.

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

Chapter 22: Databases and LING

Available Study Resources on Quizplus for this Chatper

25 Verified Questions

25 Flashcards

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

Sample Questions

Q1) A master/detail view app typically allows the user to select an entry to see (and potentially manipulate)the details associated with that entry.

A)True

B)False

Q2) DBExtensions method Load loads an entire database's data into a DbContext.

A)True

B)False

Q3) Tables from databases are commonly shown in a GUI through a ________.

A) DataBoxView

B) DataGridView

C) ListBoxView

D) SpreadSheet

Q4) Today's most popular database systems are ________.

A) management databases

B) structural databases

C) formatted databases

D) relational databases

Q5) A primary key must be unique for each record in the relational database table. A)True

B)False

24

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

Chapter 23: Asynchronous Programming With Async and Await

Available Study Resources on Quizplus for this Chatper

37 Verified Questions

37 Flashcards

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

Sample Questions

Q1) Today's ________ computers,smartphones and tablets enable computers to perform tasks truly concurrently.

A) large memory

B) multiscreen

C) soft keyboard

D) multicore

Q2) A method is declared async to indicate to the compiler that the method will

A) wait for a callback

B) perform a synchronous activity

C) create multiple threads

D) await an asynchronous task

Q3) Enumerable static method ________ creates a list of elements containing the first argument's value.The length of the list is specified by the second argument.

A) Enumerate

B) Repeat

C) Generate

D) None of the above.

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

Chapter 24: XML

Available Study Resources on Quizplus for this Chatper

72 Verified Questions

72 Flashcards

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

Sample Questions

Q1) Method ________ returns an IEnumerable< XNode > containing all children of the given XContainer.

A) Children

B) Nodes

C) Elements

D) Descendants

Q2) XML namespaces help avoid naming collisions between XML documents.

A)True

B)False

Q3) XslCompiledTransform's ____________ method applies the compiled style sheet to a specified XML document.

A) Compile

B) Load

C) Transform

D) None of the above

Q4) The EMPTY keyword specifies that the element does not contain any data between its start and end tag.

A)True

B)False

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

Chapter 25: GUI With Windows Presentation Foundation

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) A StackPanel has a vertical or horizontal flow,set by its _____ attribute.

A) Order

B) Orientation

C) FlowType

D) Direction

Q2) WPF styles require you to explicitly set the individual properties of each control.

A)True

B)False

Q3) A WPF style is a set of that can be reused for any number of controls.

A) property-value definitions

B) event-handler definitions

C) background images

D) a and b.

Q4) The ________ property determines the amount of space around a control's edges.

A) Padding

B) Margin

C) Space

D) Edges

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

Turn static files into dynamic content formats.

Create a flipbook