Object-Oriented Programming Mock Exam - 430 Verified Questions

Page 1


Object-Oriented Programming

Mock Exam

Course Introduction

Object-Oriented Programming is a course designed to introduce students to the fundamental concepts and methodologies of programming using the object-oriented paradigm. The course covers the principles of encapsulation, inheritance, polymorphism, and abstraction, providing hands-on experience with creating and manipulating objects and classes. Students will learn to structure software solutions using reusable code, design patterns, and object-oriented techniques in languages such as Java or C++. Through practical assignments and projects, the course aims to enhance problem-solving skills and prepare students to develop scalable and maintainable software applications.

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) In Visual Basic we work with objects, which have _.

A) programmer preference

B) projects and solutions

C) classes and actions

D) properties and methods

Answer: D

Q2) Programs should use comments remarks) to ___.

A) help the human reader of the program

B) make a program run more efficiently

C) make the code run faster

D) make the program smaller in size

Answer: A

Q3) Application software refers to programs that _.

A) manage the computer's hardware devices

B) controls the computers input/output

C) performs diagnostic tests on secondary storage

D) make the computer useful to the user

Answer: D

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) A label control may be added to a form by double-clicking on the Label control icon in the _window.

A) Properties

B) ToolBox

C) Project

D) Designer

Answer: B

Q2) Choose the correct assignment statement for a Label control named lblTitle that would align the control's text with the middle and center of the control's bounding box?

A) lblTitle.TextAlign = MiddleCenter

B) lblTitle.TextAlign = Middle

C) lblTitle.TextAlign = ContentAlignment.Center

D) lblTitle.TextAlign = ContentAlignment.MiddleCenter

Answer: D

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) A variable is a storage location on a computer's hard drive that holds information while the computer is off.

A)True

B)False

Answer: False

Q2) What will be assigned to the label when the following statements execute? Dim dblVal As Double = 11.75 LblResult.Text = dblVal.ToString"n3")

A) $11.75

B) 11.75

C) 11.750

D) 12

Answer: C

Q3) The contents of a text box may be cleared in Visual Basic code by .

A) by assigning the predefined constant String.Empty to the text property

B) by setting the focus on the control and using the delete key

C) by setting the focus on the control and using the back space key

D) by clicking the clear button

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) The _keyword is required to use relational operators in a Case statement.

A) To

B) else

C) If

D) Is

Q2) If the Boolean expression on the left side of an OrElse operator is true, the Boolean expression on the right side of the Or operator will not be evaluated.

A)True

B)False

Q3) To convert a copy of a string to all uppercase letters, use the method of the String object.

A) ToUpper

B) ConvertToUpper

C) ToString

D) ToUpperCase

Q4) It is possible to compare the return value of a function call with another value, using a relational operator.

A)True

B)False

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) The _method can be used to place a new item at any position in a ListBox.

A) Items.New

B) Items.Add

C) Items.Append

D) Items.Insert

Q2) Which statement about the ListBox.Add method is true?

A) It will always place the item at the end of the list.

B) It can be used to place an item anywhere in the list.

C) It finds the sum of all of the items in the list.

D) It always puts the item at the beginning of the list.

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

Q4) All of the following are valid ComboBox style properties, except

A) Drop-Down Combo Box

B) Simple Combo Box

C) List Combo Box

D) Drop-Down List Combo Box

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

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) In the context of Visual Basic procedures and functions, what is an argument?

A) A value received by a procedure from the caller

B) A value passed to a procedure by the caller.

C) A local variable that retains its value between procedure calls.

D) A disagreement between the procedure and the statement that calls it.

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

Q3) Which debugging command executes a function call without stepping through function's statements?

A) Step Into

B) Step Over

C) Step Out

D) Step All

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

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) What is the result of the following section of code? Private Sub btnExit_ClickByVal

sender As System.Object, _

ByVal e as System.EventArgs) Handles btnExit.Click Me)Close)

End Sub

A) Shut down the computer

B) Log off the current user

C) Close the current form

D) None of the above

Q2) Once you create a form, you do not have to re-create it to use it in another project. A)True

B)False

Q3) How do you insert a separator bar into a menu?

A) Type a hyphen as a menu item object's Text property.

B) Type a space as a menu item object's Text property

C) Assign True to the Separator property

D) Right-click an existing item and select Bar from the pop-up menu

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

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) What does the following section of code do? Dim intCount as Integer Dim intXXXX as Integer = intNumbers0)

For intCount = 1 to inNumbers.Length - 1)

If intNumbersintCount) > intXXXX Then IntXXXX = intNumbersintCount)

End If

Next intCount

A) Finds the first element of the array intNumbers

B) Finds the last element of the array intNumbers

C) Finds the Highest value in the array intNumbers

D) Finds the Lowest value in the array intNumbers

Q2) Which of the following could be used to iterate through each element of a two-dimensional array.

A) A single Do While loop

B) A single Do Until loop

C) A single For Next loop

D) Nested For Next loops

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

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) The method writes data to a file, followed by a newline character immediately after the data.

A) PrintLine

B) WriteLine

C) WriteNewLine

D) Write

Q2) When the PrintDocument control's Print method is executed, it triggers the _event.

A) Printer

B) PrintDoc

C) PagePrint

D) PrintPage

Q3) This predefined constant moves the print position forward to the next even multiple of 8 columns.

A) ControlChars.CrLf

B) Tab

C) vbTab

D) Space

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

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) In an SQL query, the _wildcard character, used with the LIKE operator, will match multiple unknown characters.

A) &

B) #

C) *

D) %

Q2) In SQL the bit type is equivalent to which Visual Basic data type?

A) Short

B) Boolean

C) Integer

D) String

Q3) A ____is an in-memory copy of data read from database tables.

A) data control

B) dataset

C) connection

D) data adapter

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

Page 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) The GridView control provides all the following features except .

A) it's designed to display single row at a time is displayed

B) you can sort on any column

C) you can select the order in which columns appear

D) you can format data within the columns

Q2) When the Web form default.aspx is added to a project, another file named _is also created.

A) default.asp

B) default.aspx.vb

C) default.config

D) default.vb

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) All of the following statements are true about the .NET garbage collection utility except .

A) The garbage collector is a utility program that removes objects from memory that are no longer needed.

B) As the amount of available memory decreases, the garbage collector removes unreferenced objects more often.

C) The garbage collector removes an object from memory immediately when the last reference to it has been removed.

D) The system uses an algorithm to determine when it should periodically remove unused objects.

Q2) Why is important to remove objects that are no longer need in your program?

A) To prevent over writing new objects with old data.

B) To prevent program crashes

C) To free up memory for other uses.

D) So that you can reuse the variable name.

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

14

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.