Skip to main content

Introduction to Programming with Visual Basic Final Exam - 822 Verified Questions

Page 1


Introduction to Programming with Visual Basic Final Exam

Course Introduction

Introduction to Programming with Visual Basic offers students a comprehensive foundation in computer programming using the Visual Basic language. Through a blend of theory and hands-on projects, students learn fundamental concepts such as variables, data types, control structures, procedures, object-oriented programming, and user interface design. The course emphasizes problem-solving techniques and logical thinking, guiding students to develop desktop applications in a Windows environment. By the end, students will have the skills to design, code, and debug basic applications, preparing them for further studies in programming or immediate use in academic and professional contexts.

Recommended Textbook

Programming with Microsoft Visual Basic 2017 8th Edition by Diane Zak

Available Study Resources on Quizplus

14 Chapters

822 Verified Questions

822 Flashcards

Source URL: https://quizplus.com/study-set/3209 Page 2

Chapter 1: An Introduction to Visual Basic 2015

Available Study Resources on Quizplus for this Chatper

44 Verified Questions

44 Flashcards

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

Sample Questions

Q1) The Label tool is an appropriate control to use when you do not want the user to modify data.

A)True

B)False

Answer: True

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

Q3) When a timer control is added to a form,it appears ____.

A)at the location you placed the mouse pointer on the form

B)on the Title bar

C)in the component tray

D)in the lower-right corner of the form

Answer: C

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

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) What is a TOE (Task,Object,Event)chart? Describe how it is created and used in the planning phase of an application.

Answer: A TOE (Task,Object,Event)chart is used to record the application's tasks,objects,and events,which are identified in the first three steps of the planning phase.The first step in creating the TOE chart is identifying the application's tasks.The tasks are then listed in the first column of the chart under the label "Tasks." After completing the Task column of the TOE chart,you then assign each task to an object in the user interface.Each object is listed in the second column,labeled "Object," for each corresponding task.After defining the application's tasks and assigning the tasks to objects in the interface,you then determine which event (if any)must occur for an object to carry out its assigned task.The events are listed in the third column,labeled "Event," for each corresponding task and object.

Q2) Labels that identify other controls (such as text boxes)should be right-aligned according to Windows standards.

A)True

B)False

Answer: False

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) The ControlChars.NewLine constant instructs the computer to ____.

A)advance the insertion point to the next line in a control

B)exit the routine and restart

C)restart from the beginning of the subroutine

D)strip the remainder of the routine

Answer: A

Q2) Object and String variables are automatically initialized using ____.

A)spaces

B)the keyword Nothing (no data at all)

C)the word "Nothing"

D)0

Answer: B

Q3) What are the Convert class methods and why are they sometimes used instead of conversion functions?

Answer: The Convert class contains methods that return the result of converting a value to a specified data type.They are used to convert a number (rather than a string)from one data type to another.The Convert class methods are also used because they can be used in any of the languages built into Visual Studio.The conversion functions can only be used in the Visual Basic language.

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) An application needs to display the message "Please add water" when the amount of water has fallen below the safe limit.Rewrite the following If statement to correct all errors:

If intWaterLimit < intWaterAmount Then lblWarning = "Please add water" End If

Q2) The ____ operator is evaluated last in the following expression: 9 * 2 - 8 > 5 + 2 / 2. A)-

B)+

C)> D)*

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) What is a group box and how is it used?

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

6

Chapter 5: More on the Selection Structure

Available Study Resources on Quizplus for this Chatper

58 Verified Questions

58 Flashcards

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

Sample Questions

Q1) An online bookseller uses the following schedule to determine the shipping costs: \[\begin{array} { l l l l }

\text { Category } & \text { Books Ordered } & \text { B asic Cost } & \text { Plus per B ook } \\

\text { I } & 1 - 3 & \$ 5 & .25 \\

\text { II } & 4 - 7 & \$ 7 & .20 \\

\text { III } & 8 - 11 & \$ 9 & .15 \\

\text { IV } & 12 \text { or more } & \$ 11 & .10

\end{array}\] What is a correct case expression for a category II book order based upon Books Ordered?

A)Case Is < 7

B)Case 4 To 7

C)Case Is 4 To 7

D)Case Between 4 and 7

Q2) The maximum number of radio buttons that can be selected from a group is ____.

A)one

B)three

C)five

D)seven

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) The strCode variable contains an uppercase letter.Write two different Do...Loop clauses that process the loop instructions as long as the value in the strCode variable is either A or B.Use the Until keyword in the first clause,and use the While keyword in the second clause.

Q2) Explain the purpose of priming and update reads in a program.

Q3) Programmers use a(n)____ when they need the computer to repeatedly process one or more program instructions until some condition is met,at which time the ____ ends.

A)list box

B)loop

C)index

D)counter

Q4) The assignment statement that updates a counter or an accumulator is placed within the loop in a procedure.

A)True

B)False

Q5) The startValue in a For...Next loop structure may be omitted.

A)True

B)False

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) An independent Sub procedure is a procedure that is independent of any object and event.

A)True

B)False

Q2) Write the code to add Freshman,Sophomore,Junior,and Senior to the Class combo box.Use the SelectedItem property to make Freshman the default item.

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

Q4) When using ____,you capitalize the first letter in the procedure name and the first letter of each subsequent word in the name.

A)sentence case

B)camel case

C)object case

D)Pascal case

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) The ____ method performs a case-sensitive search that returns the Boolean value True when the subString is contained anywhere in the string.

A)Insert

B)IndexOf

C)Contains

D)Substring

Q2) The following instruction will remove which character from the string first? Dim myString as string = "ABCDEFGH" MyString = myString.Remove(2,3)

A)A

B)B

C)C

D)D

Q3) The txtGrade control contains the string "95%".Write the Visual Basic statement to remove the percent sign from the txtGrade control as well as convert the contents of the control to a Decimal number.Assign the result to the decGrade variable.Use the TrimEnd method.

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) Two or more arrays whose elements are related by their positions in the arrays are referred to as ____ arrays.

A)parallel

B)two-dimensional

C)accumulator

D)related

Q2) Which of the following correctly shows the syntax for storing data in a one-dimensional array?

A)arrayname = value

B)arrayname(subscript) = value

C)arrayname = {value}

D)arrayname(subscript) = {value}

Q3) Write the statement to declare a twelve-row,two-column procedure-level array named strLocations,initializing each element to the keyword Nothing.

Q4) An advantage of using the For Each Next statement to process an array is that your code does not need to keep track of the array subscripts or even know the number of array elements.

A)True

B)False

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) Which of the following statements can be used to fill a string variable with asterisks resulting in "*****$675.89"?

A)amount=amount.Fill(12,"*")

B)amount=amount.Insert(5,"*")

C)amount=amount.PadLeft(12,"*")

D)amount=amount.Space(5, "*")

Q2) You should use the ____ method to close a sequential access file as soon as you are finished using it.

A)Exit

B)Close

C)End

D)Quit

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

Q4) Write the statement that would remove the selected item from the lstFlowers control if an item is selected.

Q5) Describe two advantages to programmers of using structures and structure variables.

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) Constructors never return a value,so they are always Function procedures.

A)True

B)False

Q2) Which of the following is a valid example of an object?

A)Place Order button in an application

B)credit card receipt

C)text box to enter the credit card number in an application

D)a and c

E)all of the above

Q3) The purpose of a(n)____ in OOP is to encapsulate the properties that describe an object,the methods that allow the object to perform tasks,and the events that allow the object to respond to actions.

A)event

B)class

C)method

D)attribute

Q4) When a variable in a class is declared using the Public keyword,it can be used only within the class.

A)True

B)False

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) What two properties should you specify for the RequiredFieldValidator?

Q2) ____ pages contain code that tells the objects on the Web page how to respond to the user's actions.

A)Dynamic ASP

B)Static

C)Header

D)Java

Q3) If you want to verify that the prescription number,first name,and last name text boxes contain data,use the ____ tool.

A)CompareValidator

B)RangeValidator

C)RequiredFieldValidator

D)TextFieldValidator

Q4) One drawback of dynamic Web pages is that they are not interactive.

A)True

B)False

Q5) Describe the difference between grouping together related radio buttons on a Windows form versus a Web form.

Q6) Describe what happens when a user clicks the Submit button on a 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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) A BindingNavigator control displays table data in a row and column format,similar to a spreadsheet.

A)True

B)False

Q2) Private Sub TblItemsBindingNavigatorSaveItem_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles

TblItemsBindingNavigatorSaveItem.Click Try Validate()

Me.TblItemsBindingSource

Me.TableAdapterManager.UpdateAll(Me.ItemsDataSet) MessageBox.Show("Changes saved","Books Galore", MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex

MessageBox.Show(ex.Message,"Books Galore", MessageBoxButtons.OK, MessageBoxIcon.Information)

End End Sub

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

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) Click ____ on the shortcut menu to start the TableAdapter Query Configuration Wizard.

A)Add Configuration

B)Add Query

C)Add Link

D)Add TableAdapter

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

A)True

B)False

Q3) Write a SQL SELECT statement that inserts the following record into the tblMembers table:

MemberID - 25631

Name - Jane Doe

Date Joined - 2012

Fee - 65

Membership Type - Adult

Q4) What is SQL and how is it used?

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

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

Page 16

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

Turn static files into dynamic content formats.

Create a flipbook
Introduction to Programming with Visual Basic Final Exam - 822 Verified Questions by Quizplus - Issuu