Object-Oriented Programming Exam Solutions - 430 Verified Questions

Page 1


Object-Oriented Programming Exam Solutions

Course Introduction

Object-Oriented Programming introduces students to the fundamental principles and techniques of object-oriented software development. The course covers concepts such as classes, objects, inheritance, polymorphism, encapsulation, and abstraction, enabling students to design and implement modular, reusable, and maintainable code. Emphasis is placed on solving real-world problems by modeling them as interacting objects, utilizing appropriate design patterns, and applying best practices in object-oriented analysis and design. Students will gain hands-on experience through programming assignments and projects using a modern object-oriented language such as Java or C++.

Recommended Textbook

Starting Out With Visual Basic 2012 6th Edition by Tony Gaddis

Available Study Resources on Quizplus

12 Chapters

430 Verified Questions

430 Flashcards

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

Chapter 1: Introduction to Programming and Visual Basic

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

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

Sample Questions

Q1) How do you display a ToolTip?

A) single-click a button on the toolbar

B) double-click a button on the toolbar

C) hold the mouse pointer over a toolbar button for a few seconds

D) tab to the button on the toolbar so that it has the focus

Answer: C

Q2) Control names may not contain spaces.

A)True

B)False

Answer: True

Q3) The Auto Hide feature .

A) enables the programmer to hide a control on a form

B) permanently removes the toolbox from the Visual Basic environment

C) hides the controls on a form until the programmer changes the status

D) causes a window to display as a tab along the edge of Visual Studio

Answer: D

Q4) Pseudocode is a combination of programming language and machine code.

A)True

B)False

Answer: False

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

Chapter 2: Creating Applications With Visual Basic

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

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

Sample Questions

Q1) Assume you have a Button control named btnDisplayList. Which is the default name for an event procedure that will be executed when the user clicks on the control?

A) Click_btnDisplayList

B) btnDisplayList_Click

C) btnDisplayList_ClickEvent

D) btnDisplayList_ClickButton

Answer: B

Q2) Which of one of the following will stop an application and end its execution?

A) Click the EDIT on the Visual Studio menu bar, and then click Delete

B) Click the Minimize button on the applications window

C) Click DEBUG on the Visual Studio menu bar, and then click Stop Debugging

D) Press F1 on the keyboard

Answer: C

Q3) In the statement Me.Close), the keyword Me refers to .

A) the current form

B) the programmer

C) the Close method

D) the Close button

Answer: A

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

Chapter 3: Variables and Calculations

Available Study Resources on Quizplus for this Chatper

41 Verified Questions

41 Flashcards

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

Sample Questions

Q1) Which of the following is not a valid Visual Basic data type?

A) Integer

B) Number

C) Decimal

D) Short

Answer: B

Q2) When you assign a value of one data type to a variable of another data type, Visual Basic attempts to perform type conversion.

A) string

B) explicit

C) implicit

D) numeric

Answer: C

Q3) If you want to display multiple lines of information in a message box, use the constant .

A) ControlChars.CrLf

B) strNEW_LINE

C) CARRAGE_RETURN_LINE_FEED

D) vbReturn

Answer: A

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

Chapter 4: Making Decisions

Available Study Resources on Quizplus for this Chatper

39 Verified Questions

39 Flashcards

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

Sample Questions

Q1) What value will be assigned to intIndex when the following statements execute? Dim strTarget As String = "asdsakfljfdgasldfjdl"

Dim intIndex = strTarget.IndexOf"as", 1, 10)

A) 12

B) 13

C) 0

D) -1

Q2) If the Boolean expression A is True and B is False, the value of the logical expression A And B is .

A)True

B)False

Q3) The If Then Else statement follows only one of the two paths.

A)True

B)False

Q4) Visual Basic uses values to represent characters such as A, B, and C in memory. A) ASCII code

B) BCD code

C) Unicode

D) ISO code

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

Chapter 5: Lists and Loops

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

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

Sample Questions

Q1) A ToolTip is a ____that allows the programmer to create a small popup message that displays when the user places the mouse over a control.

A) method

B) property

C) function

D) control

Q2) A difference between a ListBox and a drop-down ComboBox is ____.

A) a ListBox takes up less room on the form

B) a ComboBox allows the user to enter text other than what is already in the List

C) a ListBox allows the user to enter text other than what is already in the List

D) there is no difference

Q3) Which of the following statements correctly displays an input box?

A) strUserInput = Input"Enter your First Name")

B) strUserInput = Input"Enter your First Name", "Name")

C) strUserInput = InputBoxEnter your First Name, Enter Name)

D) strUserInput = InputBox"Enter your First Name", "Enter Name")

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

Chapter 6: Procedures and Functions

Available Study Resources on Quizplus for this Chatper

31 Verified Questions

31 Flashcards

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

Sample Questions

Q1) Which is the correct way to define a function named Square that receives an integer and returns an integer representing the square of the input value?

A) Function SquareByVal intNum as Integer) As Integer Return intNum * intNum

End Function

B) Function SquareByVal intNum as Integer) Return intNum * intNum

End Function

C) Function SquareByVal intNum as Integer) As Double Return intNum * intNum

End Function

D) Function SquareByVal intNum as Integer) As Double Dim dblAns as Double DblAns = intNum * intNum

Return dblAns End Function

Q2) A procedure may not be accessed by procedures from another class or form if the _access specifier is used.

A) Private

B) Public

C) Static

D) Scope

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

Chapter 7: Multiple Forms, Modules, and Menus

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

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

Sample Questions

Q1) The last form created for a Windows Forms application is designated as the startup form.

A)True

B)False

Q2) Which of the following is not true about a form's Activated event?

A) It's executed when a form is initially displayed.

B) It's executed each time a form regains the focus.

C) It's executed each time the user clicks a form that does not have the focus.

D) It's executed before the Load event procedure is processed.

Q3) When a _form is displayed, no other form in the application can receive the focus until the form is closed.

A) hidden

B) modeless

C) modal

D) show

Q4) Standard modules are saved on disk as files that end with this extension.

A) .mod

B) .proj

C) .frm

D) .vb

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

Chapter 8: Arrays and More

Available Study Resources on Quizplus for this Chatper

34 Verified Questions

34 Flashcards

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

Sample Questions

Q1) Which statement is the best solution for the following problem? Write a statement that initializes a two-dimensional array of Integers named intGrades. The array will have 2 rows, with 93, 91, and 84 in the first row and 85, 89, and 91 in the second row.

A) Dim intGrades2,3) As Integer = { {93, 91, 84}, {85, 89, 91} }

B) Dim intGrades,) As Integer = { {93, 91, 84}, {85, 89, 91} }

C) Dim intGrades) As Integer = { 93, 92, 84,85, 89, 91}

D) Dim intGrades1, 2) As Integer = { {93, 91, 84}, {85,89, 91} }

Q2) Which of the following provides the index of the highest numbered element of the array strNames?

A) strNames.Length - 1

B) strNames.Length

C) strNames.Length + 1

D) None of the above

Q3) How many elements can be stored in the following array? Dim sngGrades 2, 3) As Single

A) 6

B) 5

C) 12

D) cannot be determined

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

Page 10

Chapter 9: Files, Printing, and Structures

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

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

Sample Questions

Q1) A structure should be used instead of an array when .

A) related items should be grouped together

B) related items are of different data types

C) related items contain strings of different lengths

D) there are a limited number of related items

Q2) The FontDialog control allows the user to determine the .

A) Font

B) Font Style

C) Font Size

D) all of the above

Q3) This control is used to display a standard Windows Open dialog box.

A) OpenDialog

B) OpenFileDialog

C) OpenWindow

D) OpenWindowDialog

Q4) In order to retain data while a program is not running, data must be saved in .

A) RAM

B) a ListBox

C) a control

D) a file

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

Chapter 10: Working With Databases

Available Study Resources on Quizplus for this Chatper

32 Verified Questions

32 Flashcards

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

Sample Questions

Q1) A table adapter's method is used to add a new row to a table.

A) Add

B) Append

C) Insert

D) Update

Q2) __allows you to query many types of data from virtually any source.

A) SQL

B) LINQ

C) OPENGL

D) DirectX

Q3) Which of the following statements is false?

A) A database can store more data more efficiently than sequential text files.

B) When using a large amount of data, most developers prefer to use a DBMS.

C) Visual Basic is used to interface with the user and a DBMS works directly with the data.

D) Visual Basic statements can directly access database fields without using the DBMS.

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

12

Chapter 11: Developing Web Applications

Available Study Resources on Quizplus for this Chatper

33 Verified Questions

33 Flashcards

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

Sample Questions

Q1) Web applications are designed around a _model, meaning the one computer produces data while another uses data.

A) Client-Server

B) Peer-to-Peer

C) Master-Slave

D) Server-User

Q2) A postback occurs when the server processes the page contents and .

A) does nothing when there are no changes to the page contents

B) sends an error when the requested page is not found

C) sends a different page that was requested by the user

D) resends a modified version of the same page currently displayed

Q3) Which of the following is not one of the four types of web sites available from the ASP.NET Open Website dialog box?

A) Local IIS

B) File System

C) HTML

D) FTP site

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

Page 13

Chapter 12: Classes, Collections, and Inheritance

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

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

Sample Questions

Q1) Which of the following displays a window that lets you browse the classes available to your project?

A) Component Browser

B) Class Browser

C) Object Browser

D) Module Browser

Q2) A function that is a member of a class is called _.

A) a module

B) a method

C) a component

D) an element

Q3) An instance of a class is also called ____.

A) a tangible entity

B) an object

C) a method

D) a property

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

Page 14

Turn static files into dynamic content formats.

CreateΒ aΒ flipbook