Visual BASIC Final Exam Study Cards

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Question 47 The value of a property in a class module can be retrieved through the Get accessor method in the Property procedure. True False

. Correct Answer: True

Which of the following is Proper Procedure for Setting the Set Accessor Method? A. Set (ByVal value as String) LastNameString = Value End Set B. Set (ByVal value as DataType) LastNameString = Value or ClassValue = vadlidation End Set C. Get (ByVal value as String) LastNameString = Value End Get D. Set (Value as String) LastNameString = Value End

A. Set (ByVal value as String) LastNameString = Value End Set

To initaite printing output, you excute the _________of the print document component. A. Print Method B. DrawSting Method C. Printpage Method D. Write Method

A. Print Method

Code Modules that can be used in multiple projects? A. Reusability B. Inheritance C. Ecapsulation D. Polymorphism

A. Reusability

An Array is also called a list? A. True B. False

A. True

An exmple of using a Boolean variable is when you want to search through a list of for a specific value. A. True B. False

A. True

In order to check the end of the file one would use the StreamReader's Peek method. A. True B. False

A. True

One big advantageof ADO.net is that information is stored and transferred in Extensible Markup language (XML). A. True B. False

A. True

To make a form into a parent, simply change its IsMdiContainer property to True. A. True B. False

A. True

The code : Dim Category (12) As String A. will create 13 elements with subscripts 0 thru 12 B. will create 12 elements with subscripts 1 thru 12 C. will create 13 elements with subscripts 0 thru 13 D. will create 12 elements with subscripts 0 thru 12

A. will create 13 elements with subscripts 0 thru 12

A series of varibles; each individual element can be referenced

Array

Based upon this code where are testing the condition? Do ' Statement in loop. Loop {While I Until } Condition A. at the top of the loop B at the botton of the loop C. We are not testing it all D. Both A. and B.

B at the botton of the loop

In order to send a line of text to the graphics page, one would use the _______ . A. Print Method B. DrawSting Method C. Printpage Method D. Write Method

B. DrawSting Method

An example of using a Boolean Varible is when you to hide a value in list of values. A. True B. False

B. False

Selected Index property is set to 1 if no list item is selected? A. True B. False

B. False - it is set to -1

The Ability to create a new class based on an existing class? A. Reusability B. Inheritance C. Ecapsulation D. Polymorphism

B. Inheritance

A control that holds a list of values; the user cannot add new values at run time. A. Listcount Control B. ListBox Control C. ListIndex Control D. ListMenu Control

B. ListBox Control

The _________ reads the next data element in a data file. A. Peek Method B. Readline Method C. Close Method D. Writeline Method

B. Readline Method

A method that executes automatically when an object is instantiated. A. overloader B. constructor C. destructor D. objector

B. constructor

Each individual varible is called a __________of the array. A. member B. element C. unit D. type

B. element

New items generally go at the end of the list. However you can alter the placement by setting the control's ____________ to True A. place property B. sorted property C. items property D. list property

B. sorted property

In a multitier application which tier contains the business objects such as the Caluclation Business logic and Business rules ? A. the presentation tier B. the business tier C. the Data tier D. the Class tier

B. the business tier

Which text box event occurs when the text box loses the focus ? A. Click event B. Enter event C. Leave event D. TextChange event

C. Leave event

The ______________ holds the system date and time in a numeric format that can be used for calculations. A. Date property B. Time property C. Now property D. Current property

C. Now property

Using __________ each forms acts independently of the other forms. A. MDI's B. ToolStrips C. SDI's D. OOP's

C. SDI's

In a multitier application which tier contains the Data Retrival? A. the presentation tier B. the business tier C. the Data tier D. the Class tier

C. the Data tier

A _______ in a database table represents a field.

Column

Question 39 Which of the following steps does not necessarily occur when writing data to a data file? A new StreamWriter object must be declared The StreamWriter's WriteLine method will create a buffer in memory A new data file will always be created when a StreamWriter is declared The data to be written will be converted to string data

Correct Answer: A new data file will always be created when a StreamWriter is declared

Question 38 What does ADO stand for? Advanced Data Objects Active Data Objects ActiveX Directory Objects ActiveX Data Objects

Correct Answer: ActiveX Data Objects

Question 64 If a program does not include exception handling, what will happen when a data file is opened with the StreamReader object and the file does not exist? A file will be created The next available file on the disk will be opened A dialog box will automatically appear allowing the user to find the correct name or location of the file An exception will occur

Correct Answer: An exception will occur

Question 37 If you intend to write data to an existing data file and it is your intention to overwrite all of the data in a file, you should _______. set the BooleanAppend argument of the StreamWriter constructor to True not include the BooleanAppend argument in the StreamWriter constructor set the BooleanAppend argument of the StreamWriter to False Both s B and C are correct

Correct Answer: Both answers B and C are correct

Question 2 When you are working with an array, the easiest way to traverse the elements is to use the _______. A If / Then statement Next statement For Each / Next statement Case structure

Correct Answer: Case structure

Question 36 _______ are small samples of code that can show you how to accomplish many programming tasks and they are available from the context menu in the Editor window. SDI's ToolStrips Quickcodes Code snippets

Correct Answer: Code snippets

Question 24 Skip to the next iteration of a Do loop with the _______ statement. Exit For Exit Do Continue For Continue Do

Correct Answer: Continue Do

Question 25 Which of the following windows can be used to add a new data source? Solution Explorer Properties Data Connector Data Sources

Correct Answer: Data Sources

Question 48 Which one of the following is NOT a component that appears in the component tray after a DataGridView control has been connected to a data source? DataSet BindingSource TableAdapter DataNavigator

Correct Answer: DataNavigator

Question 46 The _______ method is used to send a line of text to the graphics page. DrawString WriteLine String Print

Correct Answer: DrawString

Question 3 _______ refers to the combination of characteristics of an object along with its behaviors. refers to Reusability Inheritance Encapsulation Polymorphism

Correct Answer: Encapsulation

Question 33 _______ refers to data hiding. Encapsulation Instantiation Inheritance Polymorphism

Correct Answer: Encapsulation

Question 15 Which text box event occurs when a text box gets the focus? Click event Enter event Leave event TextChanged event

Correct Answer: Enter event

Question 43 The _______ component can be used to validate user input. It will display a flashing icon and display a tooltip style message to the user. Validation Validate Error ErrorProvider

Correct Answer: ErrorProvider

Question 34 When is the counter tested in a FOR/NEXT statement? In the NEXT statement In the FOR statement When the counter is initialized When the counter is incremented

Correct Answer: In the FOR statement

Question 53 Items can be added to a list during design time using the _________ collection. AddLists Items ItemsAdd AddItems

Correct Answer: Items

Question 22 Items can be added to a list during run time using the _________ method. AddLists Lists ItemsAdd Items.Add

Correct Answer: Items.Add

Question 42 The _______ property of a text box can be used to control the number of characters the user can type into the box. Length InputCharacters CharacterCasing MaxLength

Correct Answer: MaxLength

Question 19 When using inheritance, you can call the base class constructor with this code: _______. BaseClass.Inherit() Inherit.Base() MyBase.New() New.BaseClass()

Correct Answer: MyBase.New() Presley Gay xd

Question 9 The acronym OOP stands for _______. Object Ordering Programs Other Object Procedures Object Organized Projects Object Oriented Programming

Correct Answer: Object Oriented Programming

Question 59 The methods and events of the _________ component can be used to set up output for the printer. Printer PrintDocument Print PrintAndPreview

Correct Answer: PrintDocument

Question 61 Property procedures are _______ by default. Local Module-level Private Public

Correct Answer: Public

Question 44 Use the _______ in order to sort the data in a combo box. Sorted property QueryBuilder Data Connector Data Sources

Correct Answer: QueryBuilder

Question 60 Which of the following is not a style for combo boxes? Simple DropDown DropDownList SimpleList

Correct Answer: SimpleList

Question 18 When does a For/Next statement terminate iteration? When executing the For statement, the counter must be greater than the final value When executing the For statement, the counter must be the same as the final value When executing the Next statement, the counter must be greater than the final value When executing the Next statement, the counter must be the same as the final value

Correct Answer: When executing the For statement, the counter must be greater than the final value

Question 57 Declare an array and specify the number of elements using _______. the ListCount property the ListIndex property an Array statement a Dim statement

Correct Answer: a Dim statement

Question 35 A class allows its properties to be retrieved through _______. a Let block a Get accessor method a Set accessor method The New keyword

Correct Answer: a Get accessor method

Question 66 A constructor that requires arguments is called _______. a Public constructor a destructor constructor a Sub New constructor a parameterized constructor

Correct Answer: a parameterized constructor

Question 62 An array is a set of variables. Each individual variable is called _______. a subscript an element a subscripted variable an index

Correct Answer: an element

Question 69 Which of the following instructions will add the word, monkey, to a list box named animalsListBox? animalsListBox.Insert(monkey) animalsListBox.Insert ("monkey") animalsListBox.Items.Add(monkey) animalsListBox.Items.Add("monkey")

Correct Answer: animalsListBox.Items.Add("monkey")

Question 29 The code to delete the selected item from colorListBox is _______. colorListBox.Clear colorListBox.RemoveItem colorListBox.Delete (colorListBox.ListIndex) colorListBox.Items.RemoveAt (colorListBox.SelectedIndex)

Correct Answer: colorListBox.Items.RemoveAt (colorListBox.SelectedIndex)

Question 67 A _______ is a temporary set of data stored in the memory of the computer. record source dataset connector table adapter

Correct Answer: dataset

Question 5 A library keeps track of all of the books a database file. Author, Title, and Subject are _______ in the database table. files records fields keys

Correct Answer: fields

Question 28 The values of Boolean data types are referred to as _______. banners flags ribbons posters

Correct Answer: flags

Question 7 Setting the BooleanAppend argument to True in the StreamWriter constructor _______. will create a new data file is used to add data to existing data files adds data to the beginning of an existing data file reads data previously stored on disk

Correct Answer: is used to add data to existing data files

Question 23 Each row in a database table represents a _______. file field record key field

Correct Answer: record

Question 26 A preschool has decided to computerize its information about each of the students. A file will be created to store the data. All of the information about one student is stored in one _______. file record field key field

Correct Answer: record

Question 51 The Get accessor method _______. retrieves the current value of a property allows you to get items from a listbox allows a class to set its properties returns the hidden enumerator

Correct Answer: retrieves the current value of a property

Question 14 Add a class module to a project by _______. selecting Add Class from the Project menu right-clicking on the project name and selecting Properties clicking on a Class object in the Toolbox right-clicking on the user interface and selecting Add Class from the menu

Correct Answer: selecting Add Class from the Project menu

Question 17 Items in a list can be placed in alphabetical order by _______. setting the Sorted property to True selecting the item in the list and then using the arrow keys to move the item up or down the list setting the Alphabetize property to True setting the Index property to 1

Correct Answer: setting the Sorted property to True

Question 68 In a multitier application, which tier contains the user interface? the Presentation tier the Business tier the Data tier the Class tier

Correct Answer: the Presentation tier

Question 45 In the statement phoneStreamWriter.WriteLine(nameTextBox.Text); nameTextBox.Text refers to _______. the record number the variable which will store the data in nameTextBox the data file number the object that contains the data that will be written to disk

Correct Answer: the object that contains the data that will be written to disk

Question 52 The statements inside of a Do/Loop may never be executed if _______. the terminating condition is at the top of the loop and it is True the first time it is tested the terminating condition is at the bottom of the loop and it is True the first time it is tested Both s A and B would cause the statements in the loop not to be executed The statements in the loop will always be executed

Correct Answer: the terminating condition is at the top of the loop and it is True the first time it is tested

Question 13 What will be the value of valueInteger after execution of these statements? For indexInteger = 1 to 10 Step 2 valueInteger += indexInteger Next indexInteger 20 25 36 None of the above.

Correct Answer: 25

Question 63 The destructor method automatically occurs _______. when an object goes out of scope when an object is destroyed when an object is created A and B are correct

Correct Answer: A and B are correct

Question 27 The SelectedIndex property of the first item in a list is _______. -1 0 1 True

Correct Answer: 0

Question 30 How many times will the statements inside this For/Next loop be executed? For indexInteger = 1 to 10 'Statements in loop Next indexInteger 5 11 9 10

Correct Answer: 10

Question 32 What is the value of indexInteger after the code in the loop below is completed? For indexInteger = 1 to 10 'Statements in loop Next indexInteger 0 1 10 11

Correct Answer: 11

Question 10 The identifier for a loop index in a For/Next statement must be loopIndexInteger. True False

Correct Answer: False

Question 12 The data files that are presented in Chapter 11, Saving Data in Files, are commonly used to store large amounts of data. True False

Correct Answer: False

Question 21 The Peek method reads the next data element in a data file. True False

Correct Answer: False

Question 41 To remove an individual item from a list box, you can use the Remove method and specify the index of the item. True False

Correct Answer: False

Question 49 Each individual variable in an array is called a "member" of the array. True False

Correct Answer: False

Question 58 When you add a class module to a project, any form in the same project will automatically recognize the class properties, methods, and events. True False

Correct Answer: False

Question 6 When an array is initialized with the Dim Statement, the index starts at 1 instead of 0. True False

Correct Answer: False

Question 65 Use the Select method of a text box in order to select the text in the text box. True False

Correct Answer: False

Question 8 Properties are actions that can be performed by a class of object. True False

Correct Answer: False

Question 1 A database may contain more than one table. True False

Correct Answer: True

Question 16 A StreamWriter object can be declared in the Declarations section of a program or in a procedure. True False

Correct Answer: True

Question 20 It is possible to add values to a list box or combo box during design by using the Items property. True False

Correct Answer: True

Question 31 The StreamWriter's WriteLine method places an Enter (carriage return) between the items in the data file. True False

Correct Answer: True

Question 4 An array is a list or series of values. True False

Correct Answer: True

Question 40 A new data file will be created if the filename does not exist when declaring a new StreamWriter object. True False

Correct Answer: True

Question 50 Creating a class module defines a new class; it does not create any objects. True False

Correct Answer: True

Question 54 The SelectedIndex property can be used to select an item in the list or to determine which item is selected. True False

Correct Answer: True

Question 55 Inheritance is the ability to create a new class from an existing class. True False

Correct Answer: True

Question 56 A loop that begins with Do Until will test the condition at the top of the loop. True False

Correct Answer: True

What will this code do? CoffeeTypeListBox.SelectedIndex = - 1 A. Select All items in list B. Deselect the first item in the list C. Select the first item in the list D. Deselect all items in the list

D. Deselect all items in the list

Which text box event occurs when the user types text into the text box portion of a combo box? A. Click event B. Enter event C. Leave event D. TextChange event

D. TextChange event

Use to repeat the statements in a loop a specific number of times.

For/Next Loop

A group of related fields; relates to data files and database tables.

Record

Index of the item currently selected in a list box or combo box.

Selet Index property

The Method used to assign a value to property?

Set Accessor Method

Question 11 A SQL Server Express file has a(n) _______ file extension. adb mdb mdf net

extension. Correct Answer: mdf


Ensembles d'études connexes

Chapter 43: Liver, Pancreas, and Biliary Tract Problems

View Set

NCLEX - MS 2 Module 2 Quiz 5 - Fundamental's Nursing - Issues in Nursing

View Set

POLI-SCI Module 3: Chapter 7 Review

View Set