Event-Driven Programming Test Questions - 802 Verified Questions

Page 1


Event-Driven Programming Test Questions

Course Introduction

Event-Driven Programming introduces students to a programming paradigm centered around responding to events or user actions, such as mouse clicks, key presses, or messages from other programs. The course covers core concepts including event loops, listeners, handlers, and callback functions. Students will learn how to design modular and interactive applications by properly structuring code to handle asynchronous operations and real-time interactions. Through hands-on projects and practical examples, learners will explore the implementation and management of events in various environments, with an emphasis on commonly used frameworks and languages such as JavaScript and Python. By the end of the course, students will be able to create responsive applications that effectively handle dynamic user input and system 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) If a solution is already open in the IDE,you are given the option to close the current solution before another solution is opened.

A)True

B)False

Answer: True

Q2) A source file contains a list of projects in a solution.

A)True

B)False

Answer: False

Q3) What is the Properties window? Describe how it is used in Visual Studio 2012.

Answer: The Properties window lists the properties,or attributes,of an object.Each object used in an application has a set of attributes that determine its appearance and behavior.The attributes are called properties,and each property has a default value assigned to it.The Properties window details the name of each property and the related value that can be applied to an attribute of an object.

Q4) The title bar on a form cannot be removed from splash screen applications.

A)True

B)False

Answer: False

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) To test an application,you should use both valid and invalid test data.

A)True

B)False

Answer: True

Q2) In the mathematical expression 12 / 6 / 2,the answer is ____.

A) 1

B) 2

C) 3

D) 4

Answer: A

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

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) The data entered by the users is currently stored in properties of controls of the form.Your first task to improve the application is to ____.

A) declare variables for all of the input data

B) rename the controls

C) change the layout of the form

D) add a colorful logo to the form

Answer: A

Q2) Which of the following statements declares a class-level variable?

A) Private Dim dblHeight As Double

B) Dim dblHeight As Double

C) Class dblHeight As Double

D) Private dblHeight As Double

Answer: D

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

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) With the KeyPress event,use the e parameter's ____ property to cancel the key if it is an inappropriate one.

A) Check

B) KeyEnter

C) KeyChar

D) Handled

Q2) The Backspace key is represented by the ____ constant.

A) ControlChars.Back

B) ControlChars.BackSpace

C) ControlChars.Backspace

D) ControlChars.Backspc

Q3) Write an If clause to determine whether the dblTemp variable contains a number that is between 65 and 75.

Q4) The ____ method displays a message box that contains text,one or more buttons,and an icon.

A) MessageBox.Display

B) MessageBox.Group

C) MessageBox.Show

D) MessageBox.Output

Q5) Write an If clause to determine whether the user pressed the Backspace key.

Page 6

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

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) When either a selection structure's true path or its false path contains another selection structure,the inner selection structure is referred to as a ____ selection structure.

A) complex

B) primary

C) nested

D) combined

Q2) When the programmer wants to allow the user to select any number of choices from a group of one or more independent and nonexclusive choices,the ____ control should be used.

A) TextBox

B) CheckBox

C) RadioButton

D) Label

Q3) In a Case selection structure,you use the ____ keyword when you know only one end of the range.

A) From

B) Is

C) To

D) Range

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) A counter is always incremented by a constant value.

A)True

B)False

Q2) A(n)____ read is used to prepare or set up a loop.

A) priming

B) initialization

C) preparation

D) set up

Q3) Which of the following loop structures always executes at least once?

A) pretest

B) posttest

C) top-driven

D) selection

Q4) The ____ method ensures that any code appearing before it that affects the interface's appearance is processed.

A) Process

B) Affect

C) Apply

D) Refresh

Q5) Explain the difference between a looping condition and a loop exit condition.

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) A Function procedure does not return a value after performing its assigned task.

A)True

B)False

Q2) In most cases,the last statement within a function is the ____ expression.

A) End Function

B) Return

C) As

D) Private

Q3) The default combo box style in Visual Basic is ____.

A) Text

B) Simple

C) DropDown

D) DropDownList

Q4) Write the code for a Sub procedure named DisplayAuto,which displays a message containing the two values passed to it: an automobile make and model.Use strMake and strModel as the parameters.Display the "You own a make model." message in a message box.Then write the statement to invoke the procedure,passing it the contents of the strBrand and strType variables,respectively.

Q5) What is the Math.Round function? Provide the function's syntax and define the arguments.

9

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

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) Write the condition that evaluates to True when the string stored in the strCode variable begins with "HFS",followed by two uppercase letters,followed by five numbers.

Q2) The most commonly used properties for a menu element are the Name and Text properties.

A)True

B)False

Q3) To insert characters within a string,you use the ____ method.

A) Add

B) Insert

C) Mid

D) IndexOf

Q4) Visual Basic provides the ____ method for accessing any number of characters contained in a string.

A) IndexOf

B) Insert

C) Contains

D) Substring

Q5) Write the condition that evaluates to True when a dash (-)appears anywhere within the strItemNum variable.

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's ____ method returns an integer that indicates the highest subscript in the specified dimension in the array.

A) Sort

B) Reverse

C) TryParse

D) GetUpperBound

Q2) A simple variable is unrelated to any other variable in memory.

A)True

B)False

Q3) An array called state()is loaded as follows: Dim state()As String = {"Ohio","Michigan","California","Arizona"}

What is the value of the subscript used to reference "Arizona"?

A) 1

B) 2

C) 3

D) 4

Q4) Write the statements to traverse the strCategory array and display each element's value in the lstCategory control.Use a For Each...Next statement.

Q5) Explain the difference between a simple variable and an array.

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) Assume that the variable amount contains the value 46.How many characters will be padded in the statement below? amount = amount.ToString.PadLeft(5)

A) two

B) three

C) four

D) five

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) Write an If clause that determines whether the sequential access file named contacts.txt exists.If the file exists,open the file.If the file does not exist,display the message "File not found" in a message box.The application is named "View Contacts".

Q4) Write the statement that would remove the item "RGT12985" from the lstPartNumber control.

Q5) What is the difference between a structure and a structure variable?

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) Constructors that contain parameters are called ____.

A) attributes

B) default constructors

C) Set blocks

D) parameterized constructors

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

A)True

B)False

Q3) A Public property procedure creates a property that is visible to any application that contains an instance of the class.

A)True

B)False

Q4) When naming the Private variables in a class,many programmers use the ____ as the first character and then use camel case for the remainder of the name.

A) dash

B) admiration sign

C) asterisk

D) underscore

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) You need to specify the fonts to be used when a Web page displays in the browser.Write the statement that will set Arial and any sans-serif font as the font family for the body of the Web page.

Q2) Which of the following is a valid filename for a file that contains the code that supports a Web page?

A) Default.vb

B) Default.aspx

C) Default.aspx.vb

D) Default.vb.aspx

Q3) You can add static text to a Web page using a ____.

A) Web application

B) browser

C) label control

D) format control

Q4) You can use the style attribute's font-family property to specify one or more fonts to use for the Web page's text.

A)True

B)False

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

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) You can use a(n)____ to specify both the records to select in a dataset and the order in which to arrange the records.

A) condition

B) parameter

C) query

D) aggregate operator

Q2) Write a LINQ statement to calculate the total value of the inventory.

Q3) Write the statements to move the record pointer to the first and last records in the dataset for the Customer table.

Q4) A database file contained in a project is referred to as a logic database file.

A)True

B)False

Q5) The ____ statement is used for exception handling in a procedure.

A) Try...Catch

B) LINQ

C) Order By

D) aggregate

Q6) What is the DataGridView control and how is it used?

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

Page 15

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

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) One record is added to the AccountsDataSet.Which of the following statements will save the record in the Accounts database?

A) TblAccountsTableAdapter.Update(AccountsDataSet.tblAccounts)

B) TblAccountsTableAdapter.Save(AccountsDataSet.tblAccounts)

C) TblAccountsTableAdapter.Store(AccountsDataSet.tblAccounts)

D) TblAccountsBindingSource.Update(AccountsDataSet.tblAccounts)

Q2) Because it is possible for an error to occur when saving data to a database,it's a good programming practice to place the Update method within the ____ block of a Try Catch statement.

A) Try

B) Catch

C) Assert

D) Fail

Q3) The syntax to add a record to a dataset is ____.

A) dataSetName.tableName.Add(valueField1[,valueField2 ,valueFieldN])

B) dataSetName.tableName.AddRow(valueField1[,valueField2 ,valueFieldN])

C) dataSetName.tableName.AddtableNameRow(valueField1[,valueField2 ,valueFieldN])

D) dataSetName.tableName.AddRowtableName(valueField1[,valueField2 ,valueFieldN])

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

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

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
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.