Skip to main content

Introduction to Programming with Visual Basic Midterm Exam - 429 Verified Questions

Page 1


Introduction to Programming with Visual Basic

Midterm Exam

Course Introduction

This course introduces students to the fundamental concepts of programming using Visual Basic. Through hands-on exercises and real-world examples, students will learn the basics of algorithm development, problem-solving, and structured programming. Key topics include variables, data types, control structures (such as decision-making and loops), procedures, functions, and error handling. The course also covers graphical user interface (GUI) design, allowing students to develop interactive Windows applications. By the end of the course, participants will be able to design, write, test, and debug Visual Basic programs, equipping them with a strong foundation for further study in software development.

Recommended Textbook

Starting Out With Visual Basic 7th Edition by Tony Gaddis

Available Study Resources on Quizplus

12 Chapters

429 Verified Questions

429 Flashcards

Source URL: https://quizplus.com/study-set/3925 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/78277

Sample Questions

Q1) All of the following are major hardware components of a typical computer system except ______.

A) Main Memory

B) CPU

C) Operating System

D) secondary storage

Answer: C

Q2) Control names may begin with a letter or a number.

A)True

B)False

Answer: False

Q3) An object in Visual Basic ____________.

A) is also referred to as an event handler

B) is an attribute of a control

C) is an action performed by a method

D) contains data called properties

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/78276

Sample Questions

Q1) The ________________control uses a Label to display program status information and messages to the user.

A) LinkLabel

B) StatusStrip

C) ErrorProvider

D) TextBox

Answer: B

Q2) How do you make a Label control's text display bold characters?

A) Select Font from the View menu, and then select the label.

B) Select the Label in the designer, and click the ellipses button next to Font in the Solution Explorer window.

C) Select the Label in the designer, and click the ellipses button next to Font in the Properties window.

D) Select the Label control and set the BoldText property to True in the Properties window. Answer: C

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

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/78275

Sample Questions

Q1) When you declare a constant, you must assign it an initial value.

A)True

B)False

Answer: True

Q2) All numeric and date data types have a ______method that returns a string representation of the contents of the variable.

A) Convert

B) String

C) ToString

D) ToText

Answer: C

Q3) Which of the following is not true in regard to naming variables?

A) Names may contain underscores.

B) Names may contain letters.

C) Names may contain digits.

D) Names may contain spaces.

Answer: D

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/78274

Sample Questions

Q1) Suppose you want to determine whether a variable, decPayAmount, is between 1200 and 1400, inclusively. If it is, you want to set lblMessage text to "Pay amount is in the range". Which of the following code segments will accomplish this?

A) If decPayAmount < = 1200 And decPayAmount >= 1400 Then lblMessage.Text = "Pay amount is in the range"

End If

B) If decPayAmount < =1200 Or decPayAmount >= 1400 Then lblMessage.Text = "Pay amount is in the range"

End If

C) If decPayAmount >=1200 And decPayAmount < =1400 then lblMessage.Text = "Pay amount is in the range"

End If

D) If decPayAmount > 1200 Or decPayAmount < 1400 Then lblMessage.Text = "Pay amount is in the range"

End If

Q2) The expression <b>IsNumeric(13.75)</b> returns the value __________.

A) True

B) 1375

C) 14

D) 13.75

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/78273

Sample Questions

Q1) Which of the following statements will assign a random number between 1 and 50 inclusive to <b>intNum</b>?

A) intNum = rand.Next(50) + 1

B) intNum = rand.Next(1, 50)

C) intNum = rand.Next(50)

D) intNum = rand.Next()

Q2) The <b>InputBox</b> function always returns a ______value.

A) Single

B) Double

C) Text

D) String

Q3) What will be the final value of intCount?

Dim intCount As Integer = 3

Do

IntCount += 6

Loop While intCount < 20

A) 20

B) 21

C) 15

D) 9

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/78272

Sample Questions

Q1) Which statement is not true regarding functions?

A) A function is a self-contained set of statements that can receive input values.

B) Visual Basic has many built-in functions such as CSng(txtInput.Text)

C) A function can only return a single value.

D) The same function can return several data types including integer, string, or double

Q2) When debugging a program in break mode, the Step Into command causes the currently highlighted line of code to execute.

A)True

B)False

Q3) Which of the following calls to the GetNumber procedure is not valid?

<b> Sub GetNumber(ByVal intNumber as Integer)

' (procedure body)

End Sub</b>

A) GetNumber(intX)

B) GetNumber(3 + 5 * 8 + intX)

C) GetNumber(intX + 3, intY)

D) GetNumber(CInt(txtNumber.Text))

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

35 Verified Questions

35 Flashcards

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

Sample Questions

Q1) Which of the following statements most accurately describes the Me keyword?

A) The Me keyword refers to the current instance of the form.

B) Me is another name for the Form Load event procedure.

C) The Me.Close() statement calls the Close method of a form named Me.

D) The Me keyword provides access to the controls of a form without naming the specific control.

Q2) When a VB application executes, its ______is automatically displayed.

A) main sub

B) startup form

C) event procedure

D) form load event

Q3) All of the following are true of the Show method of a form except:

A) using the Show method allows other forms to receive the focus

B) the Show method allows a calling program to continue to process statements

C) the displayed form must be closed before you can access other forms

D) the Show method displays a modeless form

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

A)True

B)False

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/78270

Sample Questions

Q1) What happens to most controls when the Enabled property is set to False?

A) The control responds to events generated by the user.

B) The control can receive the focus

C) The control appears grayed out, or dimmed

D) The control does not appear

Q2) Which of the following allows an application to automatically execute code at regular time intervals?

A) Timer Enabled Event

B) Interval Property

C) Timer Event

D) Timer control

Q3) Which of the following is the correct definition for a procedure that accepts a String array as an argument?

A) Private Sub ArrayParam(ByVal strStudents As String)

B) Public Sub ArrayParam(ByVal strStudents())

C) Sub ArrayParam(ByVal strStudents() As String)

D) Private Sub ArrayParam(ByRef strStudents As String)

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

Chapter 9: Files, Printing, and Structure

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

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

Sample Questions

Q1) Which of the following statements are not true about text files?

A) contains plain text

B) cannot be viewed with an editor such as Notepad

C) is the simplest type of data file

D) known as a sequential-access file

Q2) The StreamReader object's ______is used to determine when the end of the file has been reached.

A) EndOfStream property

B) Poke method

C) EOF flag

D) FileEnd flag

Q3) Reports with columnar data should not use __________.

A) proportionally spaced fonts

B) the Courier New font

C) monospaced fonts

D) all of the above

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/78268

Sample Questions

Q1) Which table adapter method reads data from the database into the dataset?

A) Fill

B) Read

C) Select

D) Retrieve

Q2) A database _____________is organized into rows and columns.

A) grid

B) matrix

C) table

D) spreadsheet

Q3) A ____statement in SQL retrieves data from a database.

A) Select

B) Search

C) Find

D) SearchTable

Q4) _______allows you to query many types of data from virtually any source.

A) SQL

B) LINQ

C) OPENGL

D) DirectX

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/78267

Sample Questions

Q1) Web forms use a ________control to access a database and retrieve table rows.

A) DataSet

B) DataSource

C) DataDetails

D) Connection

Q2) When the Web first became popular, _______was the only available tool for creating pages with text, graphics, buttons, and input forms.

A) JavaScript

B) HTML

C) PHP

D) XML

Q3) The <b>DetailsView</b> control allows the user to do which of the following?

A) display multiple rows of a database table at the same time

B) connect to a data source

C) view but not edit the rows of a database

D) all of the above are true

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/78266

Sample Questions

Q1) A ______defines a special type of class member that contains Get and Set sections.

A) method

B) constructor

C) property procedure

D) member variable

Q2) ______is a general model of something - it captures the general characteristics of an object.

A) A constructor

B) A collection

C) An instance

D) An abstraction

Q3) A variable declared inside a class is also known as a __________.

A) member variable

B) static variable

C) hidden variable

D) global variable

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
Introduction to Programming with Visual Basic Midterm Exam - 429 Verified Questions by Quizplus - Issuu