Skip to main content

Object-Oriented Programming Exam Answer Key - 1124 Verified Questions

Page 1


Object-Oriented Programming

Exam Answer Key

Course Introduction

Object-Oriented Programming is a foundational course that introduces students to the principles and techniques of designing software using the object-oriented paradigm. Topics covered include encapsulation, inheritance, polymorphism, and abstraction, with an emphasis on modeling real-world problems through classes and objects. Students will learn how to structure scalable, reusable, and maintainable code by applying these concepts in practical programming assignments, often using languages such as Java, C++, or Python. The course also explores design patterns, best practices, and debugging strategies relevant to object-oriented development, preparing students for advanced software engineering courses and industry-standard programming tasks.

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 Visual Studio IDE is an interactive environment that enables you to type the source code,compile,and execute without leaving the IDE program.

A)True

B)False

Answer: True

Q2) A(n)______________ is a clear,unambiguous,step-by-step process for solving a problem.

Answer: algorithm

Q3) During which phase of software development should questions be asked to clarify the problem definition?

A) analysis

B) design

C) coding

D) testing

Answer: A

Q4) A(n)____________ is a mock-up of screens depicting the look of the final output. Answer: prototype

Q5) The _________ identifies the range of the values an input item includes. Answer: domain

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 value $78,888.90 is printed as output when the {0:c)format specifier is used in the following Write statement: Console.Write("{0:c}",78888.894);

A)True

B)False

Answer: False

Q2) The float compile-time initialization above will produce an error because it is missing the type specifier (f or F).

A)True

B)False

Answer: True

Q3) One convention used for naming identifiers is called Pascal case. This convention requires that ____.

A) the first letter be lowercase with the first letter of each subsequent word capitalized

B) all letters appear in uppercase characters

C) the first letter be uppercase with the first letter of each subsequent word capitalized

D) all letters appear in lowercase with words separated by an underscore

Answer: C

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) The definition of the method ____.

A) is the same as the heading for the method

B) is the body of the method

C) includes everything between the curly braces

D) includes the heading and the body

Answer: D

Q2) Avoid writing long methods.Consider refactoring when the method exceeds ____________ lines of code

Answer: 25

Q3) The term ____________ is often used to indicate where an identifier has meaning and can be used

Answer: visible

Q4) ____________ is an overloaded method of the Math class that returns the larger of two specified numbers.

Answer: Max( )

Q5) Call by ____________ is the default parameter type. Answer: value

Q6) ____________ is used to indicate that no value is being returned from a method. Answer: void

Page 5

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

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) Instance methods are ____.

A) nonstatic methods.

B) also called class methods.

C) defined in the Main( ) method.

D) defined outside of the class.

Q2) C# is an object-oriented language as such all the code that you write has to be placed in a(n)____________.

Q3) A property looks like a method because it directly represents a storage location.

A)True

B)False

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

Q5) The return type for constructors is always the type of the class.

A)True

B)False

Q6) ____________ access modifier is always associated with constructors.

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) Using a single equal symbol inside a conditional expression,where a test was intended,causes a syntax error to be issued in C#.

A)True

B)False

Q2) By properly ____________ the else clauses with their corresponding if clauses,you encounter fewer logic errors that necessitate debugging.

Q3) The three basic programming constructs are simple sequence,selection,and iteration.

A)True

B)False

Q4) When a single variable may need to be tested for five different values,the most readable solution would be a(n)____.

A) one-way if statement

B) two-way if statement

C) switch statement

D) nested if....else statement

Q5) Forms of the if statement include one-way,two-way,____________,multiway,and compound.

Q6) A conditional expression is also referred to as a(n)____________.

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

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) With counter controlled loops,it is important to think through and ____________ to ensure they have been taken into consideration.You should always check the initial and final values of the loop control variable and verify that you get the expected results at the boundaries.

Q2) The while statement is the only type of loop construct that can be used to develop a sentinel-controlled loop.

A)True

B)False

Q3) s = num.Next(7); The statement above produces seven random numbers. A)True

B)False

Q4) Inside the for statement,when you place a semicolon after the parentheses without anything to the left of it,it indicates that no statement or a(n)____________ statement is associated with the initialize portion.

Q5) When one of the program statement included within the body of a loop is another loop,a(n)____________ loop is created.

Q6) The third programming construct repetition is also called ____________.

Q7) A sentinel value is a(n)____________.It is a value that should not be processed.

Page 8

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

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) Which of the following could be a method heading for a member method that returns an array?

A) int [ ] void DoSomething( )

B) void int [ ] DoSomething( )

C) int [ ] DoSomething( )

D) void DoSomething[ ]

Q2) You can declare an array without dimensioning its size,but the size must be determined before you can access it.

A)True

B)False

Q3) With parallel arrays,the relationship is established through using the same subscript or index to refer to the elements in both arrays.

A)True

B)False

Q4) Use .NET predefined methods and properties whenever possible as opposed to writing new code.

A)True

B)False

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

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) The ____ method adds an object to the end of the queue.

A) Enqueue( )

B) Dequeue( )

C) Pop( )

D) Push( )

Q2) With C#,you are limited to 10 dimensions for multi-dimensional arrays.

A)True

B)False

Q3) Console.Write("anExample".IndexOf("a"));returns ____.

A) null

B) 4

C) 04

D) 0

Q4) Strings are considered ____________ because once you give a string a value;it cannot be

modified.Methods that seem to be modifying a string are actually returning a new string containing the modification.

Q5) With the declaration above,price[1] refers to 1.2.

A)True

B)False

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) Which property can be set to indicate whether text in the TextBox is read-only or not?

A) InputOnly

B) AcceptsText

C) ReadOnly

D) TextInputOnly

Q2) Inheriting characteristics from base classes adds ____________ to your program without the burden of your having to do additional coding

Q3) It is more important to spend time designing a prototype for Windows applications than console-based applications.

A)True

B)False

Q4) With Windows applications,you write methods called processors to indicate what should be done when a mouse is clicked on a button or the press of a key occurs.

A)True

B)False

Q5) Using the ____________ feature in Visual Studio,controls can be more easily aligned when they are initially added to the form.

To view all questions and flashcards with answers, click on the resource link above. Page 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) The process that includes identifying an event,such as a button click as being of interest,and associating a method to be executed when the event occurs describes ____.

A) wiring an event

B) delegating an event

C) balancing an event

D) referencing an event

Q2) A test plan to verify the accuracy of the application should be designed before coding the application.

A)True

B)False

Q3) To have the ListBox or ComboBox Items arranged in alphabetical order ____.

A) the values must be originally type in the desired order.

B) use a drag and drop approach move the items into their correct order.

C) set the Sorted property to true.

D) set the Ordered property to ascending or descending.

Q4) The ____________ method associated with the predefined dialog classes,like FontDialog or ColorDialog causes the dialog box to be displayed.

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

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

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) Classes that inherit from a base class are called ____________ classes.

Q2) Generics enable you to identify where data will change in the code segment by putting a placeholder in the code for the type parameters.

A)True

B)False

Q3) Encapsulation enables multiple implementations of the same behaviors so that the appropriate implementation can be executed based on the situation.

A)True

B)False

Q4) When you have a method that has the same name in both the base and derived classes,use the keyword super to refer to the method in the base class.

A)True

B)False

Q5) Class library components should be compiled using a Build option instead of Running the application.

A)True

B)False

Q6) A stack represents a simple ____________ collection.

Page 13

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

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) While in debug mode,you can look inside a method and examine the method's program statements using ____.

A) Step Out

B) Step Into

C) Step Over

D) Step Inside

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

Q3) Bugs are normally labeled as ____.

A) programmer mistakes

B) logic errors

C) handled exceptions

D) unhandled exceptions

Q4) ____ is/are used to facilitate managing exceptions in a consistent,efficient way.

A) if...else

B) try...catch...finally

C) Event handlers

D) Loops

Q5) Custom exceptions must derive from the ____________ class.

Q6) C# adheres to a fairly sophisticated set of rules known as C# ____________.

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) The ____________ method of the StreamReader class enables you to retrieve one line of text from the file.

Q2) A structure is a special form of value type that supplies alternate names for the values of an underlying primitive type.

A)True

B)False

Q3) The ____________ class makes it easy to write data to a file because it has implementations for the Write( )and WriteLine( )methods.

Q4) The constructor for the StreamWriter can include additional arguments indicating whether the file should be appended to or overwritten if it already exists.

A)True

B)False

Q5) Streams are also used in C# to read and write data to binary files.

A)True

B)False

Q6) A(n)____________ is a special form of value type that supplies names for the values.

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

Page 15

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

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) To retrieve data from a database programmatically,one of the first things you must do is ____.

A) issue a command to retrieve the records from the database

B) include a using directive inside the try...catch block to add a reference to the correct data provider

C) connect to the database

D) turn on the data provider database engine

Q2) The ADO.NET architecture encapsulates the details of differing database structures such as Oracle,as opposed to Access,in the form of ____.

A) data providers

B) databases

C) data adapters

D) data tables

Q3) Applications that connect to a Microsoft Access database use the OLE DB data provider.

A)True

B)False

Q4) You identify which records and fields you want to retrieve from the database using the SQL ____________ statement.

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) The code-behind file with ASP.NET is saved using which file extension?

A)xaml

B)xaml.cs

C) .aspx

D)aspx.cs

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

Q3) With ASP.NET,you write code in a separate scripting language such as JavaScript or VBScript.

A)True

B)False

Q4) There are more controls to add to a Web application than there are for Windows applications.

A)True

B)False

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
Object-Oriented Programming Exam Answer Key - 1124 Verified Questions by Quizplus - Issuu