

Event-Driven Programming
Midterm Exam
Course Introduction
Event-Driven Programming is a software development paradigm that centers on the flow of the program being determined by external events such as user actions, sensor outputs, or messages from other programs. This course introduces students to the principles and techniques of event-driven design, including callbacks, event listeners, handlers, and the use of frameworks and libraries for building interactive applications. Students will learn to architect responsive systems, manage asynchronous operations, and design scalable solutions typically found in graphical user interfaces, web applications, and real-time systems. Through hands-on projects and exercises, participants will develop practical skills in creating interactive programs that react dynamically to a variety of inputs and events.
Recommended Textbook
Programming with Microsoft Visual Basic 2012 6th Edition by Diane Zak
Available Study Resources on Quizplus
14 Chapters
802 Verified Questions
802 Flashcards
Source URL: https://quizplus.com/study-set/3279

Page 2
Chapter 1: An Introduction to Visual Basic 2012
Available Study Resources on Quizplus for this Chatper
59 Verified Questions
59 Flashcards
Source URL: https://quizplus.com/quiz/65089
Sample Questions
Q1) You enter the procedure's code in the ____ window.
A) Code Editor
B) Server
C) Solution
D) Designer Answer: A
Q2) A class definition is a block of code that specifies or defines an object's appearance and behavior.
A)True
B)False
Answer: True
Q3) A user ____ is what the user sees and interacts with while an application is running.
A) service
B) profile
C) splash
D) interface
Answer: D
To view all questions and flashcards with answers, click on the resource link above.

Page 3

Chapter 2: Designing Applications
Available Study Resources on Quizplus for this Chatper
57 Verified Questions
57 Flashcards
Source URL: https://quizplus.com/quiz/65090
Sample Questions
Q1) The syntax of the Focus method is ____,where "object" is the name of the object to which you want the focus sent.
A) object.GetFocus()
B) object.SetFocus()
C) object.Focus()
D) object.FocusThis()
Answer: C
Q2) How many text boxes do you need for the application?
A) three
B) four
C) five
D) six
Answer: B
Q3) The number of different colors used on a form should be limited to ____ colors exclusive of black,white,and gray.
A) two
B) three
C) four
D) five
Answer: B
To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Using Variables and Constants
Available Study Resources on Quizplus for this Chatper
58 Verified Questions
58 Flashcards
Source URL: https://quizplus.com/quiz/65091
Sample Questions
Q1) You cannot associate a procedure with more than one object or event.
A)True
B)False
Answer: False
Q2) A procedure in an application needs to store data used to calculate the total price of purchasing tires.The price of the tires will contain a decimal place.The number of tires will always be a whole number.Write the appropriate Dim statements to declare the variables.Make sure to use appropriate naming conventions.
Answer: Dim decPrice As Decimal
Dim intTires As Integer
Q3) A control's ____ event occurs when a change is made to the contents of a control's Text property.
A) CodeChanged
B) TextChanged
C) ChangedText
D) TextModified
Answer: B
Q4) What is a static variable? How is it different from a class-level variable?
Answer: 11ea7cc1_5d3e_2f40_928c_3bfbf4b3c39d_TB6958_00
To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: The Selection Structure
Available Study Resources on Quizplus for this Chatper
57 Verified Questions
57 Flashcards
Source URL: https://quizplus.com/quiz/65092
Sample Questions
Q1) If dblMiles >= 500 Then dblMiles = dblMiles * 0.45
Else
DblMiles = dblMiles * 0.25
End If
The dblMiles variable contains the number 575 before the code above is processed.What value will be in the variable after the code is processed?
A) 0
B) 143.75
C) 225
D) 258.75
Q2) What is a selection structure? What is the difference between a single-alternative and dual-alternative selection structure?
Q3) Before using a string in a comparison,you can use either the ToUpper method or the ToLower method to convert the string to uppercase or lowercase,respectively,and then use the converted string in the comparison.
A)True
B)False
Q4) What is a group box and how is it used?
Q5) Write an If clause to determine whether the user pressed the Backspace key.
To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: More on the Selection Structure
Available Study Resources on Quizplus for this Chatper
56 Verified Questions
56 Flashcards
Source URL: https://quizplus.com/quiz/65093
Sample Questions
Q1) If the intQuantity variable contains the number 10 and the customer is a member,what value will be in the decTotal variable after the code is processed?
A) 0
B) 125
C) 140
D) 150
Q2) The minimum number of radio buttons in a group is one.
A)True
B)False
Q3) If the intQuantity variable contains the number 25 and the customer is not a member,what value will be in the decTotal variable after the code is processed?
A) 0
B) 312.50
C) 350
D) 375
Q4) What is a nested selection structure? How do primary and secondary decisions relate to a nested selection structure?
Q5) Define the term "algorithm." How is desk-checking used to verify algorithms?
To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: The Repetition Structure
Available Study Resources on Quizplus for this Chatper
59 Verified Questions
59 Flashcards
Source URL: https://quizplus.com/quiz/65094
Sample Questions
Q1) You can use either the SelectedItem or ____ property to determine whether an item is selected in a list box.
A) Selection
B) SelectedIndex
C) ItemChoice
D) Items
Q2) Explain the difference between a looping condition and a loop exit condition.
Q3) Adding increments of a negative number is referred to as ____.
A) decrementing
B) initializing
C) deprocessing
D) negating
Q4) Write the assignment statements needed to increment the intCount counter by 1 and update the decBalance variable by the value stored in the decOrderAmount variable.
Q5) What is a counter-controlled loop and when is it used in a program? What statement provides the most efficient way to write a counter-controlled loop?
Q6) What is the Refresh method? Write the syntax for this method.
Q7) What is a list box? Provide two of the Windows standards for its use on a form.
Page 8
To view all questions and flashcards with answers, click on the resource link above.

Chapter 7: Sub and Function Procedures
Available Study Resources on Quizplus for this Chatper
56 Verified Questions
56 Flashcards
Source URL: https://quizplus.com/quiz/65095
Sample Questions
Q1) For the access key to work correctly in a combo box,you must set the label's TabIndex property to a value that is ____ the combo box's TabIndex value.
A) identical to B) one less than C) one more than D) greater than or equal to
Q2) When will the TextChanged event occur for a combo box? Which style allows the user to edit the text of the combo box?
Q3) An event procedure is a Function procedure that is associated with a specific object and event.
A)True
B)False
Q4) In most cases,the last statement within a function is the ____ expression.
A) End Function
B) Return
C) As
D) Private
Q5) What is the difference between a Sub procedure and a Function procedure?
To view all questions and flashcards with answers, click on the resource link above. Page 9

Chapter 8: String Manipulation
Available Study Resources on Quizplus for this Chatper
57 Verified Questions
57 Flashcards
Source URL: https://quizplus.com/quiz/65096
Sample Questions
Q1) The strSerialNum variable contains the string "DRY259614".Write the Visual Basic statement that assigns the string "259614" from the strSerialNum variable to the strProductCode variable.
Q2) What is the difference between a menu item's access key and shortcut key?
Q3) Write the condition that evaluates to True when a dash (-)appears anywhere within the strItemNum variable.
Q4) The HR department has decided to change the Finance department number from 04 to 09.Which of the following statements correctly changes the contents of the strEmpCode?
A) strEmpCode = strEmpCode.Replace("04","09")
B) strEmpCode = strEmpCode.Replace("09","04")
C) strEmpCode = strEmpCode.Remove(0,2)
StrEmpCode = strEmpCode.Insert(1,"09")
D) strEmpCode = strEmpCode.Remove(1,2)
StrEmpCode = strEmpCode.Insert(1,"04")
Q5) A literal type character forces a literal constant to assume a data type other than the one its form indicates.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Arrays
Available Study Resources on Quizplus for this Chatper
57 Verified Questions
57 Flashcards
Source URL: https://quizplus.com/quiz/65097
Sample Questions
Q1) The following statement will declare an array.What is the index value for the first element? Dim lakes(5)
A) 0
B) 1
C) 4
D) 5
Q2) Write the statement to declare a seven-element procedure-level array named strItemCode with each element initialized to the keyword Nothing.
Q3) Which of the following statements declares a class-level one-dimensional array named strToppings that stores the 14 available pizza toppings?
A) Dim strToppings(13)As String
B) Private strToppings(13)As String
C) Dim strToppings(14)As String
D) Private strToppings(14)As String
Q4) Write the statement to declare a twelve-row,two-column procedure-level array named strLocations,initializing each element to the keyword Nothing.
Q5) How do the elements in parallel one-dimensional arrays relate to each other? Provide an example.
To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Structures and Sequential Access Files
Available Study Resources on Quizplus for this Chatper
58 Verified Questions
58 Flashcards
Source URL: https://quizplus.com/quiz/65098
Sample Questions
Q1) Write a Structure statement that defines a structure named Vehicle.The structure contains three member variables named strMake,strModel,and intYear.Then write the Private statement that declares a Vehicle variable named truck.
Q2) Data types created using the Structure statement are referred to as user-defined data types or structures.
A)True
B)False
Q3) The ____ method writes a newline character after the data.
A) WriteLine
B) ReadLine
C) Write method
D) Read
Q4) Files that are read by the computer are called ____ files.
A) storage
B) serial
C) input
D) report
Q5) Write the statement that would remove the selected item from the lstFlowers control if an item is selected.
To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Classes and Objects
Available Study Resources on Quizplus for this Chatper
58 Verified Questions
58 Flashcards
Source URL: https://quizplus.com/quiz/65099
Sample Questions
Q1) When a variable in a class is declared using the Public keyword,it can be used only within the class.
A)True
B)False
Q2) A one-dimensional array's Length property is an example of a ReadOnly property.
A)True
B)False
Q3) The Lumber class definition contains two Private variables named _dblLength and _decPricePerFoot.The default constructor initializes the Private variables to 0 when the Lumber object is created.Write the statements to create a parameterized constructor,and then write the Dim statement using the parameterized constructor to instantiate and initialize the Lumber object where the number of feet of lumber is 31.5 and the price per foot is 1.85.
Q4) A(n)____ is a class method whose sole purpose is to initialize the class's Private variables.
A) signature
B) constructor
C) Get block
D) event
Q5) What is an auto-implemented property and what does it automatically create?
Page 13
To view all questions and flashcards with answers, click on the resource link above.

Chapter 12: Web Applications
Available Study Resources on Quizplus for this Chatper
55 Verified Questions
55 Flashcards
Source URL: https://quizplus.com/quiz/65100
Sample Questions
Q1) The Web consists of documents called ____ that are stored on Web servers.
A) URLs
B) browsers
C) clients
D) Web pages
Q2) The ____ tag in a Web page is similar to the ControlChars.NewLine constant in a Windows form.
A) <div>
B) <h1>
C) <p>
D) <br />
Q3) A drop-down list control has been added to a Web page.Add the following four majors as list items to the control: Information Systems,Accounting,Management,and Marketing.
Q4) The purpose of the ____ tool is to compare an entry with a constant value or the property stored in a control.
A) CompareValidator
B) RegularExpressionValidator
C) RequiredFieldValidator
D) CustomValidator
To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: Working With Access Databases and Linq
Available Study Resources on Quizplus for this Chatper
57 Verified Questions
57 Flashcards
Source URL: https://quizplus.com/quiz/65101
Sample Questions
Q1) Write a LINQ statement to select all records.
Q2) The BindingSource object stores the position of the record pointer in its ____ property.
A) View
B) Position
C) Navigation
D) Cell
Q3) The ____ clause of LINQ is used to arrange the records in either ascending (the default)or descending order by one or more fields.
A) Order By
B) condition
C) query
D) Where
Q4) The ____ object provides the connection between the DataSet and the bound controls on the form.
A) TableAdapter
B) DataGridView
C) BindingSource
D) BindingNavigator
Q5) What is the DataGridView control and how is it used?
To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Access Databases and SQL
Available Study Resources on Quizplus for this Chatper
58 Verified Questions
58 Flashcards
Source URL: https://quizplus.com/quiz/65102
Sample Questions
Q1) The ____ clause is used to arrange the records in either ascending (the default)or descending order by one or more fields.
A) GROUP BY
B) WHERE
C) ORDER BY
D) JOIN
Q2) Most of the time,you will know in advance the values to include in the criteria of a query.
A)True
B)False
Q3) The wildcard character is the ____.
A) %
B) &
C) *
D) @
Q4) For the changes made to a dataset to be permanent,you need to save the changes to the database associated with the dataset.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 16