Object-Oriented Programming Test Preparation - 1124 Verified Questions

Page 1


Object-Oriented Programming Test Preparation

Course Introduction

Object-Oriented Programming introduces the fundamental principles of designing and implementing software using objects and classes. The course covers essential concepts such as encapsulation, inheritance, polymorphism, and abstraction, enabling students to build modular, reusable, and maintainable code. Students will learn how to structure programs by breaking down complex problems into manageable components, utilize class hierarchies, and use interfaces and design patterns. Through hands-on projects and assignments, the course emphasizes practical application of object-oriented methodologies in solving real-world programming challenges.

Recommended Textbook

C# Programming From Problem Analysis to Program Design 4th Edition by Barbara Doyle

Available Study Resources on Quizplus

15 Chapters

1124 Verified Questions

1124 Flashcards

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

Chapter 1: Introduction to Computing and Programming

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) The System namespace contains classes that define commonly used types or classes.

A)True

B)False

Answer: True

Q2) Console is a ____ and WriteLine( )is a ____.

A) method, class

B) namespace, method

C) class, namespace

D) class, method

Answer: D

Q3) A(n)____ version of software has not been fully tested and may still contain bugs or errors.

A) alpha

B) maintenance

C) bug

D) beta

Answer: D

Q4) C# has a set of rules,called _________,that must be followed.

Answer: syntax

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

Chapter 2: Data Types and Expressions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) The ____________ data type is a whole number,between a certain range of values,and contains no decimal point.

Answer: int

Q2) Classes are actually implemented through types in C#. A)True

B)False

Answer: False

Q3) A(n)____________ represents an area in the computer memory where a value of a particular data type can be stored.When you declare a(n)____________,you allocate memory for that data item in your program.

Answer: variable

Q4) The C# category of ____________ operators appear at the top of the precedence table with the order of operations.

Answer: unary

Q5) One of the rules for creating a(n)____________ is to use a combination of alphabetic characters,numeric digits and the underscore character.

Answer: identifier

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

4

Chapter 3: Methods and Behaviors

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Both out and ref parameter types cause a method to refer to the same variable that was passed into the method.

A)True

B)False

Answer: True

Q2) Which of the following is NOT a parameter type?

A) out

B) in

C) ref

D) params

Answer: B

Q3) An advantage of using named parameters is: ____.

A) program runs more efficiently because the named parameters can be accessed

B) program runs faster

C) you can send in values through using the names of the parameters instead of having to worry about getting the exact order

D) default values can be used

Answer: C

Q4) When naming local variable identifiers and parameters,use ____________.

Answer: camel casing

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

Chapter 4: Creating Your Own Classes

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Accessors are also referred to as ____.

A) mutators

B) properties

C) getters

D) classes

Q2) Which of the following is true regarding methods of a class?

A) You must use the keyword static.

B) They are called instance methods.

C) To call methods of the class in the class, you must prefix the method name with the class name.

D) No return type is used when you define a class method.

Q3) A standard convention used by C# programmers is to use camel case style for property identifiers;Camel case style convention is also used for data member identifiers.

A)True

B)False

Q4) With the object-oriented approach,objects send messages to other objects and receive messages from objects.

A)True

B)False

Page 6

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

Chapter 5: Making Decisions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) if (examScore > 89) grade = 'A'; The expression above is considered a(n)____.

A) iteration statement

B) two-way if statement

C) one-way if statement

D) simple sequence instruction

Q2) A comparison to determine whether the uppercase character S is less than the uppercase character W produces false.

A)True

B)False

Q3) Equality comparisons with floating-point and decimal types often produce unpredictable results.

A)True

B)False

Q4) What is stored in result when amount is equal to 12000?

A) 1

B) 2

C) 3

D) 4

Q5) You cannot use the ____________ statement to test for a range of values.

Page 7

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

Chapter 6: Repeating Instructions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Unlike the sentinel-controlled loop,the variable used with a state-controlled loop differs from the variable used to store the data that is being processed.

A)True

B)False

Q2) An interpretation of the while statement is "while the condition is true,perform statement(s)".

A)True

B)False

Q3) Instead of requiring that a dummy value be entered after all values are processed,a ____-controlled loop initializes a variable on the outside of the loop and then evaluates the variable to see when it changes values.Its value is changed inside the loop body when the loop should exit.

A) counter

B) sentinel

C) state

D) change

Q4) The for statement is a compact method of writing the loops that can be written using while;it packages together the ____________,test,and update all on one line.

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

8

Chapter 7: Arrays

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Because arrays are reference types,the ref keyword is required with the argument and parameter list.

A)True

B)False

Q2) If you do not know the size of the array needed,you can create an array large enough to hold any number of entries and tell users to enter a predetermined sentinel value after they enter the last value.Using this approach:

A) requires that you increment a counter as values are entered so that you know how many elements are stored in your array

B) is preferred to defining a static sized array.

C) requires that you dimension the array to hold at least 100 entries.

D) requires the array be defined to hold string elements.

Q3) When you pass a single array element such as an integer,you are passing by reference.

A)True

B)False

Q4) To create an array to hold the 5 numeric scores,you could write ____________.

Q5) The first element of an array is always referenced by index ____________.

Q6) All data values placed in an array must be of the same ____________.

Page 9

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

Chapter 8: Advanced Collections

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Collection classes are classes that enable you to store and retrieve various groups of objects.

A)True

B)False

Q2) The string method that retrieves part of a string from a string argument is ____.

A) Trim( )

B) Substring( )

C) Retrieve( )

D) IndexOf( )

Q3) Which of the following returns the number of columns in a two-dimensional array?

A) Rank

B) GetLength(0)

C) GetLength(1)

D) GetLength

Q4) The Length property can be used to return the total number of elements in all dimensions.

A)True

B)False

Q5) The property ____________ returns the number of dimensions of the array.

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

Chapter 9: Introduction to Windows Programming

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) The ____ property is used to determine whether a control is the one currently selected.

A) Control

B) Focused

C) Enabled

D) Visible

Q2) Visual Studio automatically imports the System.Windows.Forms namespace for you when you create a Windows Application Project using the IDE.

A)True

B)False

Q3) The statement above adds the text "An Example" as the first entry on the form in the bottom left-hand corner.

A)True

B)False

Q4) Most classes,including control classes such as Label,Button,and TextBox,used with Windows application are defined in the ____________ namespace.

Q5) If you accidentally double-click on the form,you register the ____________ event.

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

11

Chapter 10: Programming Based on Events

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

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

Sample Questions

Q1) ____ objects usually appear as small boxes that allow users to make a yes/no selection.

A) RadioButton

B) ListBox

C) CheckBox

D) ComboBox

Q2) An added value of ComboBox objects is that compared to a ListBox object they ____.

A) save space on a form

B) enable input and output of data

C) can be used for multiple selections

D) can have events of interest registered

Q3) The Items,SelectedItems,and SelectedIndices properties are useful for retrieving selected items from the ListBox object.

A)True

B)False

Q4) The ____________ property can be set for RadioButton controls to indicate which button is initially selected.

Q5) The default event-handler method for CheckBox objects is ____________.

Page 12

Q6) The ____________ event fires when a key is pressed while the control has focus.

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

Chapter 11: Advanced Object-Oriented Programming

Features

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Enabling multiple implementations of the same behaviors so that the appropriate implementation can be executed based on the situation describes ____ as it relates to object oriented development.

A) abstraction

B) encapsulation

C) polymorphism

D) inheritance

Q2) ____ classes cannot be instantiated.____ classes cannot be inherited.

A) Abstract, Sealed

B) Sealed. Abstract

C) Abstract, Abstract

D) Sealed, Sealed

Q3) Classes can have a "has a" relationship.This is a concept called ____ or aggregation.

A) "is a"

B) inheritance

C) polymorphism

D) containment

Q4) Through ____________ the CLR determines which method to call at run time based on which object calls the method.

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

Chapter 12: Debugging and Handling Exceptions

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) An exception handler is a ____.

A) block of code that is executed when an exception occurs

B) Windows event handler

C) menu option under the debugger

D) trace of methods invoked during the problem

Q2) The ____ property associated with exception objects returns a string describing the exception.

A) Text

B) Message

C) StackTrace

D) Name

Q3) With the Debugger,while in break mode,you can examine expressions to see what values are being generated.

A)True

B)False

Q4) You should desk check solutions to make sure the program is producing consistently accurate results.

A)True

B)False

Q5) A(n)____________ error is associated with a language rule violation.

Page 14

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

Chapter 13: Working with Files

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) If you use Visual Studio and include a reference to the System.IO namespace,IntelliSense provides helpful information while you are developing your file application.

A)True

B)False

Q2) If an invalid path is included with the constructor for a StreamWriter object,____.

A) an InValidPathException is thrown

B) a System exception occurs

C) an IOException exception is thrown

D) the program terminates

Q3) The identifier that can be referenced in a WriteLine( )method with the declaration above is ____.

A) someOutputFileName

B) someInputFileName

C) outputFile

D) inputFile

Q4) If you do not specify the full path for the filename,Visual Studio uses the ____________ subdirectory of the current project.

Q5) Archive is a(n)____________ value for the Attributes property of the File class.

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

Chapter 14: Working with Databases

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Typically when you are programming for database access,you use a(n)____________.

Q2) sConnection = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=member.accdb";is an example of a(n)____________.

Q3) The default server name for SQL Express is (LocalDB)\v11.0.

A)True

B)False

Q4) The connection string includes ____.

A) the data provider and the database name

B) SQL statement to retrieve the data

C) the type of database

D) an open statement

Q5) The ADO namespace includes a number of classes that allow you to interact with databases.

A)True

B)False

Q6) The four core classes that make up each data provider are ____________,Command,DataReader,and DataAdapter.

Q7) The ____________ provides a visual representation of the dataset and table adapter.It can be used to create and modify data and table adapters and their queries.

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

Chapter 15: Web-Based Applications

Available Study Resources on Quizplus for this Chatper

75 Verified Questions

75 Flashcards

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

Sample Questions

Q1) Master pages actually consist of two pieces: the master page itself and one or more ____________ pages.

Q2) The ____ class reduces your need for accessing individual data provider classes when you are connecting to an Access database.

A) SqlDataBase

B) ODBCDatabase

C) OLEDBDataBase

D) AccessDataSource

Q3) ____________ tags tell the browser how to display data in different formats,for example,in bold or italic or in different fonts or font sizes.

Q4) All of the following types of controls can be added to a Web Forms page,EXCEPT ____.

A) Standard

B) HTML

C) ASP controls

D) Validation

Q5) Use the ____________ property to tie a validation control to a specific form control object such as a TextBox object.

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

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.