Visual Basic Programming Final Exam - 795 Verified Questions

Page 1


Visual Basic Programming Final

Exam

Course Introduction

Visual Basic Programming introduces students to the fundamentals of programming using Visual Basic, a widely-used event-driven programming language from Microsoft. The course covers essential concepts such as variables, data types, control structures, procedures, functions, and object-oriented principles. Students learn how to design and develop user-friendly graphical interfaces, handle events, and implement basic error handling. Through hands-on projects and practical exercises, learners gain experience in building simple applications, reinforcing programming logic and problem-solving skills vital for software development in a Windows environment.

Recommended Textbook

Programming in Visual Basic 2010 1st Edition by Julia Case Bradley

Available Study Resources on Quizplus

14 Chapters

795 Verified Questions

795 Flashcards

Source URL: https://quizplus.com/study-set/2524

Page 2

Chapter 1: Introduction to Visual Basic 2010

Available Study Resources on Quizplus for this Chatper

54 Verified Questions

54 Flashcards

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

Sample Questions

Q1) If the programmer does not write code for a button control,Visual Basic automatically provides code in the Click procedure that will close the form when the user clicks the button.

A)True

B)False

Answer: False

Q2) The _______ holds information about the solution and the projects it contains.This is the file that you open to work on or run your project.

A)project file

B)resource file

C)solution file

D)vb file

Answer: C

Q3) In order to properly save changes that have been made to a Visual Basic project,you should choose Save All from the File menu.

A)True

B)False

Answer: True

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

Chapter 2: User Interface Design

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

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

Sample Questions

Q1) In order to make a picture expand to fill an image control,you must _______.

A)set the SizeMode property to StretchImage

B)set the Visible property to True

C)set the SizeMode property to AutoSize

D)set the Visible property to False

Answer: A

Q2) Which of the following is the best choice when the user needs to input her social security number?

A)RichTextBox

B)TextBox

C)MaskedTextBox

D)GroupBox

Answer: C

Q3) You can break a long line of code into multiple lines by ________ and then continuing writing code on the next line.

A)pressing the Enter key at the end of the line

B)adding a blank space and an ampersand (&)at the end of the line

C)adding a blank space and an underscore ( _ )at the end of the line

D)A or C above

Answer: D

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

Chapter 3: Variables, Constants, and Calculations

Available Study Resources on Quizplus for this Chatper

58 Verified Questions

58 Flashcards

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

Sample Questions

Q1) A constant contains data whose value may be changed during the execution of a project.

A)True

B)False

Answer: False

Q2) SCHOOL_NAME_String is in the correct format for a constant that holds the name of your school.

A)True

B)False

Answer: True

Q3) Which of the following is NOT a valid rule for naming identifiers?

A)Names may contain underscores.

B)Names may contain letters.

C)Names may contain digits.

D)Names may contain spaces.

Answer: D

Q4) Calculations may be performed with variables.

A)True

B)False

Answer: True

Page 5

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

Chapter 4: Decisions and Conditions

Available Study Resources on Quizplus for this Chatper

51 Verified Questions

51 Flashcards

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

Sample Questions

Q1) When using Select Case,the group of statements must end with End Case.

A)True

B)False

Q2) A block of If / Then / Else must begin with an If statement and end with an EndOfIf statement.

A)True

B)False

Q3) The Debug.WriteLine method will display its results in the ________ window.

A)Debug

B)Immediate

C)WriteLine

D)Breakpoint

Q4) AndAlso is a logical operator that will "short-circuit" if the first expression is False.

A)True

B)False

Q5) Each ELSE will be matched with the last unmatched IF,regardless of indentation.

A)True

B)False

Q6) What are the six comparison operators? Give an example using each one.

Page 6

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

Chapter 5: Menus, Common Dialog Boxes, Sub Procedures, and

Function

Available Study Resources on Quizplus for this Chatper

38 Verified Questions

38 Flashcards

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

Sample Questions

Q1) Which of the following is NOT true about passing arguments to procedures or functions?

A)Arguments may be passed ByVal or ByRef.

B)An argument that is passed ByRef cannot alter the original value.

C)Specifying ByVal or ByRef is not required when passing arguments.

D)If ByVal or ByRef is not specified,the argument will be sent by value.

Q2) When creating a menu,if an item named "Help" is listed,it should be at the far right and the H should have keyboard access.

A)True

B)False

Q3) A function cannot have multiple arguments.

A)True

B)False

Q4) An enabled menu item appears in black text and is available for selection.

A)True

B)False

Q5) When you call a sub procedure or a function procedure,you can send values,called arguments.

A)True

B)False

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

Chapter 6: Multiform Projects

Available Study Resources on Quizplus for this Chatper

69 Verified Questions

69 Flashcards

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

Sample Questions

Q1) If you need the user to respond to a form before continuing,you should display the form as _______.

A)modular

B)modal

C)modeless

D)modeled

Q2) Message boxes allow the programmer to be very creative when displaying summary information and company logos.

A)True

B)False

Q3) Use _______ to make a variable available to all classes in a project.

A)Dim

B)Friend

C)Static

D)Const

Q4) Where may Static statements appear?

A)In a local procedure

B)In a block of code

C)In the Declarations section of a form

D)Answers A and B are both correct.

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

Chapter 7: Lists, loops, and Printing

Available Study Resources on Quizplus for this Chatper

76 Verified Questions

76 Flashcards

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

Sample Questions

Q1) What is the Items collection and how does it relate to a list box and/or a combo box?

Q2) The identifier for a loop index in a For/Next statement must be LoopIndexInteger.

A)True

B)False

Q3) What is the value of the SelectedIndex property if the user has selected the last item in a list with four items?

A)3

B)4

C)5

D)0

Q4) The group of repeated instructions in a Do/Loop is called a(n)__________.

A)group

B)set

C)loop body

D)iteration

Q5) Write the code for a FOR NEXT loop that will execute as many times as there are items in a combo box named ItemsComboBox.Use CountInteger as the counter (loop index).

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

Chapter 8: Arrays and Collections

Available Study Resources on Quizplus for this Chatper

50 Verified Questions

50 Flashcards

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

Sample Questions

Q1) The Structure / End Structure statements may be used to represent a record of related fields of information.

A)True B)False

Q2) There are several collections defined in .NET to help programmers manage in-memory data.

A)True

B)False

Q3) Each element in an array can have its own unique data type. A)True B)False

Q4) An array is a series of individual variables,all referenced by the same name but having unique indexes.

A)True

B)False

Q5) Write a structure called Student that contains the following items: Last Name,First Name,Student ID,CurrentG.P.A.

Q6) A Structure declaration cannot go inside a procedure. A)True B)False

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

Chapter 9: Web Applications

Available Study Resources on Quizplus for this Chatper

66 Verified Questions

66 Flashcards

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

Sample Questions

Q1) Add an HTML table to a Web Form if you want to have more control over the placement of elements on the Web page.

A)True

B)False

Q2) To make a button display "Press Me" on a Web Form,you must set the button's _______ property.

A)Image

B)ID

C)Text

D)Message

Q3) Which of the following is NOT software that allows a development machine to act as a Web server?

A)Internet Explorer

B)Visual Studio Web server

C)Internet Information Services (IIS)

D)All of these are Web server software

Q4) A Web Form created in Visual Basic can only be displayed in Internet Explorer.

A)True

B)False

Q5) What are the functions of the server and client in a Web application?

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

Chapter 10: Database Applications

Available Study Resources on Quizplus for this Chatper

43 Verified Questions

43 Flashcards

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

Sample Questions

Q1) If you select a database on a local disk drive when you select "Local Database File",the Data Source Configuration Wizard,if you so request,will create a copy of the database file in the project's folder.

A)True

B)False

Q2) A doctor's office uses a database to store information about each of the patients.All of the information about a patient is stored in a _______.

A)file in the database

B)record in a database table

C)field in the database table

D)key field

Q3) Each time the user selects an item from a list box in a Web page,a postback occurs,the Web page will redisplay,and the Page_Load event will occur.

A)True

B)False

Q4) A database may contain more than one table.

A)True

B)False

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

Chapter 11: Data Files

Available Study Resources on Quizplus for this Chatper

43 Verified Questions

43 Flashcards

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

Sample Questions

Q1) A new data file will be created if the filename does not exist when declaring a new StreamWriter object.

A)True

B)False

Q2) Data elements that are added to a data file in the append mode are written at the end of the file,but may later be read in random order.

A)True

B)False

Q3) What should be used to handle exceptions and avoid terminating the program when an exception occurs during run-time?

A)Do / Loop

B)Off Error

C)Case Error

D)Try/Catch

Q4) The standard Windows OpenFileDialog component can be used in your VB program to allow users to browse for a folder and filename.

A)True

B)False

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

Page 13

Chapter 12: OOP: Creating Object-Oriented Programs

Available Study Resources on Quizplus for this Chatper

51 Verified Questions

51 Flashcards

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

Sample Questions

Q1) Declaring a variable for a class object sets up the memory location for the new object,but it does not actually create the object.

A)True

B)False

Q2) Property procedures are Public by default,so you can omit the optional Public keyword at the beginning of the Property procedure.

A)True

B)False

Q3) Which of the following is NOT true?

A)The code,"Private TheBookSale As BookSale()" creates an object.

B)The code,"Dim TheBookSale as New BookSale()" creates an object.

C)Button is a class.

D)A button created from the toolbox and named,ExitButton,is an object.

Q4) Which of the following is NOT true?

A)A separate memory location exists for each instance of a class.

B)Shared variables are available for all objects of a class.

C)Shared members can be accessed without instantiating an object of the class.

D)Instance members can be used as counters or accumulators.

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

Page 14

Chapter 13: Graphics, Animation, Sound, and

Drag-And-Drop

Available Study Resources on Quizplus for this Chatper

62 Verified Questions

62 Flashcards

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

Sample Questions

Q1) The _______ has two components,the width and height.

A)Point structure

B)Size structure

C)Rectangle structure

D)Graphics method

Q2) The Windows Media Player control can play audio and video files in many formats,including .avi,.wmv,and .wav.

A)True

B)False

Q3) The _______ property of a scroll bar determines the distance to move when the user clicks the gray area of the scroll bar or presses the Page-Up or Page-Down keys.

A)Minimum

B)Maximum

C)SmallChange

D)LargeChange

Q4) The Scroll event of a scroll bar occurs anytime the scroll box is moved.

A)True

B)False

Page 15

Q5) Explain the use of the X and Y coordinates in the drawing methods.

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

Chapter 14: Additional Topics in Visual Basic

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

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

Sample Questions

Q1) WPF controls can only be added to Web Forms,not Windows Forms.

A)True

B)False

Q2) MDI projects have a parent form and child forms.

A)True

B)False

Q3) SDI is an acronym that stands for _______.

A)Single Device Interface

B)Single Document Interface

C)Subset Document Interlink

D)Switch Document Interlink

Q4) The DateTimePicker control has a Value property for the date.

A)True

B)False

Q5) With _______,you can use WPF controls in a Windows Form application.

A)XAML

B)WPF Interoperability

C)DHTML

D)XML

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.