Event-Driven Programming Exam Practice Tests - 802 Verified Questions

Page 1


Event-Driven Programming Exam Practice Tests

Course Introduction

Event-Driven Programming focuses on the development of software that responds to events or user actions, such as mouse clicks, key presses, or sensor outputs. This course explores the principles, patterns, and techniques that underpin event-driven architectures in modern computing. Students will learn to design and implement interactive programs that utilize event handlers, callbacks, and listeners across various platforms, including graphical user interfaces, web applications, and embedded systems. Through hands-on projects and case studies, learners will gain practical experience in leveraging tools and frameworks commonly used for event-driven development, fostering a strong foundation for building responsive and flexible software solutions.

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) To start an application using the menu bar,you click ____ and then click Start Debugging.

A) DEBUG

B) PROJECT

C) VIEW

D) BUILD

Answer: A

Q2) The Project Designer window allows you to specify which form will display when the application starts.

A)True

B)False

Answer: True

Q3) The most effective way to accomplish this task is to create a(n)____.

A) PictureBox control

B) splash screen

C) Label control

D) Exit button

Answer: B

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 first step in planning an OO application is to ____.

A) draw a sketch of the user interface

B) identify the objects to which tasks will be assigned

C) identify the tasks the application needs to perform

D) identify the event required to trigger an object to perform its assigned tasks

Answer: C

Q2) The programming process begins with a meeting between the programmer and the client.Which of the following activities would be the last activity in the programming process?

A) Build the user interface.

B) Code the application.

C) Test and debug.

D) Assemble the documentation.

Answer: D

Q3) Most invalid data is a result of typing errors that occur when entering instructions. A)True

B)False

Answer: True

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

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) All numeric variables are automatically initialized to 0 if no initial value is specified when the variable is declared.

A)True

B)False

Answer: True

Q2) A variable that was not assigned a specific data type is assigned the ____ data type.

A) Char

B) String

C) Boolean

D) Object

Answer: D

Q3) Specifying the number of decimal places and the special characters to display in a number is called ____.

A) formatting

B) concatenating

C) shredding

D) designing

Answer: A

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) Consider the expression 3 * 2 ^ 2 < 16 + 5 AndAlso 100 / 10 * 2 > 15 - 3.Which operation is performed first?

A) ^

B) /

C) *

D) +

Q2) The Not operator would make a True statement False,but would not make a False statement True.

A)True

B)False

Q3) In the MessageBox.Show(text,caption,buttons,icon[,defaultButton])method,which of the following arguments controls the words appearing on the message box title bar?

A) text

B) caption

C) buttons

D) icon

Q4) Write an If statement that allows only numbers and a decimal place to be accepted.

Q5) What is a group box and how is it used?

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) You meet with the manager to show her the interface and obtain feedback.She tells you that very few customers request dry cleaned clothes to be folded.She suggests only applying the folding fee if a customer makes a special request,and it should be calculated for all laundered items in a customer's order.You decide to make the folding fee ____.

A) a single radio button and remove it from the nested selection structure

B) a single check box and remove it from the nested selection structure

Q2) Write a multiple-alternative selection structure that displays the name of an instructor based on the class section entered by the user.The class section is stored (as uppercase)in the strSection variable.Display "Edwards" when the class section is A.Display "Hughes" when the class section is B.Display "Meadows" when the class section is C.For all other sections,display "To Be Announced".Display the message in the lblMessage control.Use the If/ElseIf/Else form of the If...Then...Else statement.

Q3) When a user selects a second CheckBox in a group,previously selected CheckBox items are deselected.

A)True

B)False

Q4) 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) In a Do...Loop statement,a condition can be phrased as either a looping condition or a loop enter condition.

A)True

B)False

Q2) You changed the Do clause to the correct For clause in the previous problem.You also changed the Loop keyword to the Next keyword for the For...Next loop.What else needs to be changed about the Do loop?

A) The statement before the loop declaring the counter variable needs to be removed. B) The statement within the loop incrementing the counter variable needs to be removed.

C) You need to add a step value to the For clause because the default step value is 0. D) a and b

Q3) What is the Refresh method? Write the syntax for this method.

Q4) A counter is always incremented by a constant value.

A)True

B)False

Q5) Explain the difference between a pretest loop and a posttest loop.

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

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) Write the code for a function named CalculateBonus.The function receives two decimal variables representing the salary and bonus rate.The function should calculate the bonus amount by multiplying the salary by the bonus rate,and then return the result.Then write the appropriate statement to invoke the function,passing it the decSalary and decRate variables.Assign the function's return value to the decBonus variable.

Q2) The number of arguments listed in the Call statement's argumentList should agree with the number of parameters listed in the parameterList in the procedure header.

A)True

B)False

Q3) An independent Sub procedure can contain one or more ____ in its procedure header that have procedure scope and store an item of data. A) events B) variables C) constraints

D) parameters

Q4) Math.Round(3.234,2)returns the number 3.24.

A)True

B)False

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 most commonly used properties for a menu element are the Name and Text properties.

A)True

B)False

Q2) You can use a string's Value property to determine the number of characters it stores.

A)True

B)False

Q3) Each employee is assigned an employee code,such as F01234,which is stored in the strEmpCode variable.The first character is a letter for employment status (F for Full-time,P for Part-time).The next two characters are numbers representing the employee's department number.The last three characters are numbers representing a unique value for each individual employee.Which of the following statements assigns the employee's department to the strDept variable?

A) strDept = strEmpCode.Substring(0,1)

B) strDept = strEmpCode.Substring(1)

C) strDept = strEmpCode.Substring(0,2)

D) strDept = strEmpCode.Substring(1,2)

Q4) What is the difference between a menu item's access key and shortcut key?

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) An array is defined as follows: Dim numbers(3)As Integer How many elements does the array have?

A) one

B) two

C) three

D) four

Q2) When an array is sorted in descending order,the first element in the array contains the smallest value and the last element contains the largest value.

A)True

B)False

Q3) Storing data in an array decreases the efficiency of your code.

A)True

B)False

Q4) A two-dimensional array resembles a table in that the variables (elements)are in rows and columns.

A)True

B)False

Q5) Write the statement to declare a seven-element procedure-level array named strItemCode with each element initialized to the keyword Nothing.

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) Which of the following statements will close the sequential access file associated with the outFile variable?

A) outFile.End()

B) outFile.Quit()

C) outFile.IO()

D) outFile.Close()

Q2) After opening a file for input,you can use the ____ to read the file's contents,one line at a time.

A) ReadLine method

B) OpenText method

C) AppendText method

D) WriteLine method

Q3) You cannot include an array in a structure.

A)True

B)False

Q4) Which of the following declares a StreamReader variable named newFile?

A) Dim inFile As IO.StreamReader

B) Dim newFile As IO.StreamReader

C) Dim newFile As IO.StreamWriter

D) Dim newFile As StreamReader

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) In its simplest form,the Class statement can be used in place of the Structure statement.

A)True

B)False

Q2) A method name combined with its optional parameterList is called the method's ____.

A) signature

B) event

C) attribute

D) behavior

Q3) You can overload any of the methods contained in a class.

A)True

B)False

Q4) Private variables represent properties that will be seen by anyone using an object created from the class.

A)True

B)False

Q5) A class can have multiple default constructors.

A)True

B)False

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

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 Rows property is used to add rows and columns (cells)to a table.

A)True

B)False

Q2) A(n)____ Web page contains controls with which the user can interact.

A) HTML

B) static

C) ASP

D) dynamic

Q3) The properties of the RequiredFieldValidator tool are ____.

A) ControlToValidate,ErrorMessage,and ClientValidationFunction

B) ControlToValidate and ErrorMessage

C) ControlToValidate,ErrorMessage,MinimumValue,MaximumValue,and Type

D) ErrorMessage,MinimumValue,MaximumValue,and Type

Q4) A drop-down list control has been added to a Web page.Add the following three products as list items to the control: washer,dryer,and refrigerator.

Q5) 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.

Q6) What is the difference between a static Web page and a dynamic Web page?

Page 14

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

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) A relational database can contain one or more tables.

A)True

B)False

Q2) Before an application can access the data stored in a database,you need to connect the application to the database.

A)True

B)False

Q3) To create a DataGridView control on the form,you would click on the ____ object in the Data Sources window and drag it to the form.

A) CustomerNum

B) InvoiceNum

C) CustomerDataSet

D) tblCustomer

Q4) Write the code to calculate the average price of all of the bicycles in inventory.

Q5) Each column in a table represents a record and each row represents a field.

A)True

B)False

Q6) 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) Which of the following is not true regarding the Query Builder?

A) The table and its related fields are displayed in the Diagram pane.

B) You cannot view the results of the query in the Query Builder once it is executed.

C) You can manually type the SELECT statement instead of using the Query Builder.

D) You must click the Execute Query button for the query to run.

Q2) What is a parameter query and how is it used?

Q3) The statement SELECT YearWon FROM tblMovies WHERE Title = 'Chicago' selects the Chicago field from the YearWon record.

A)True

B)False

Q4) Write the statement to sort the records in alphabetic order by last name.

Q5) Write a SQL SELECT statement that selects the MemberID,LastName,and FirstName fields for members having a last name that begins with the letter J.

Q6) In order for an application to use a query during run time,you will need to save the query and then invoke it from code.

A)True

B)False

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

Page 16

Turn static files into dynamic content formats.

Create a flipbook