VB.NET MIDTERM
Winter Quarter, 2004

Please use the attached sheet to fill your answer. Thank You

True/False
Indicate whether the sentence or statement is true or false.

	1.	The items in the Properties box can only be arraigned by category.

	2.	Visual Basic .NET can only be used to create simple programs.

	3.	The Solutions Explorer is used to access forms.

	4.	Moving and resizing command buttons is a difficult process.

	5.	Controls are the command buttons, text boxes, scroll bars, and other objects that make up the user interface.

	6.	If the Solutions Explorer, Properties, and Form Layout windows are not displayed, click the Edit menu and then click the appropriate window names.

	7.	Once added to a form, objects cannot be deleted.

	8.	In an event-driven system, the computer is constantly waiting for the user to take some action with the mouse, keyboard, or other device.

	9.	To add code to the Code window, you must cut and paste the code from an existing program.

	10.	Integer division returns only the whole number portion of the division of integers.

	11.	Placing an apostrophe in code allows you to enter comments into the code.

	12.	The plus symbol (+) is used as a line-continuation character when Visual Basic code runs to two or more lines.

	13.	Text boxes cannot accept data from a user.

	14.	The Dim statement is used to change the brightness of the monitor display.

	15.	Bytes, Strings, Dates, Decimal, and Objects are all examples of data types.

	16.	All data in a computer is actually stored numerically.

	17.	Object variables can hold any type of data.

	18.	Naming prefixes can be used to identify the data type of a variable.

	19.	The percent sign (%) is the symbol used for concatenation.

	20.	When assigning text to a string variable, you must place the text in quotation marks.

	21.	The Length property determines the length of the text in a string.

	22.	The Double data type is used for decimal values with more than 38 digits.

	23.	When assigning a date to a variable, you should qualify the date with a $ symbol.

	24.	In a flowchart, a diamond shape represents a decision to be made.

	25.	The If statement is the most common way to make a decision in Visual Basic .NET.

	26.	If you want to exit from a loop, you should always use Exit Loop command.

	27.	The Or operator returns True only if one value connected by the Or operator is True.

	28.	Logical operators can be used to combine comparisons into one statement.

	29.	Radio buttons can be named using the Text property.

	30.	When using nested If statement, it is important that you properly indent the code.

	31.	Radio buttons are sometimes called option buttons.

	32.	In a Select Case statement, a variable to test is specified and a number of cases to test for is listed.

	33.	When a program repeats a group of statements a number of times, the repetition is accomplished using a link.

	34.	A Do Until Posttest loop will always execute at least once.

	35.	In an endless loop, the condition that is supposed to stop the loop from repeating never becomes True.

	36.	Loops cannot be nested inside each other.

	37.	For Next loops always involve a Counter variable.

	38.	Dim strCity(3) as string will declare an array that has three elements.

	39.	A sub (event procedure) always returns a value back to the calling method.

	40.	A ListBox can be emptied using the Items.Clear method.

Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.

	41.	Visual Basic .NET stores programs in a group of files called a 
a.	project	c.	gang	
b.	folder	d.	cabinet	

	42.	Which of the following is not included with the Visual Studio .NET programming environment
a.	menu bar	c.	toolbox	
b.	toolbars	d.	project map	

	43.	Which window lets you view the files that make up a project
a.	Solutions Explorer	c.	Project Explorer	
b.	File Explorer	d.	Project Window	

	44.	The letters IDE stands for
a.	Interpreter Development Editor	c.	Integrated Development Environment	
b.	Integrated Development Editor	d.	Integral Development Environment	

	45.	The Solution Explorer window can be opened by choosing Solution Explorer from 
a.	the display menu	c.	the Solution menu	
b.	the tools menu	d.	the View menu	

	46.	You can delete an object by selecting the object and pressing the
a.	Delete key	c.	Space bar	
b.	Backspace key	d.	Ctrl-Del keys	

	47.	A program can be compiled and run by using the 
a.	F5 key only	c.	F4 key	
b.	Start button on the toolbar	d.	either F5 or Start button	

	48.	The characteristics of Visual Basic .NET objects are called
a.	Properties	c.	Characteristics	
b.	Text	d.	Name	

	49.	The color of a form can be changed by changing which property
a.	FormColor	c.	BackColor	
b.	Color	d.	ControlColor	

	50.	The code you write to handle a specific event is called an
a.	Event procedure	c.	Click handler	
b.	Event routine	d.	Double click	

	51.	The first step in adding code to an object is to access the 
a.	Code window	c.	Drawing window	
b.	Object window	d.	Form designer	

	52.	Windows is a(n) __________ environment.
a.	Event-driven	c.	sequential	
b.	Complicated	d.	batch	

	53.	What character in a text property names the following character as an Access Key?
a.	ampersand (&) 	c.	Dash(-)	
b.	Plus(+)	d.	Underscore (_)	

	54.	Which of the following events can a program respond to
a.	MouseClick	c.	MouseOver	
b.	DoubleCLick	d.	All of the above	

	55.	In order to change the value of an object property using code you must know the 
a.	name of the object	c.	location of the object	
b.	current value of the property	d.	name of the form	

	56.	A variable's ________________ indicates which procedures can use a variable.
a.	Type	c.	Name	
b.	Scope	d.	Value	

	57.	Which of the following is not a type of scope for a variable
a.	Local	c.	Form level	
b.	Global	d.	Special	

	58.	A ______________________ is declared in the General Declarations section of a form's Code window.
a.	Local variable	c.	Form level variable	
b.	Global variable	d.	Special variable	

	59.	What scope is required for a variable to be accessible across multiple forms
a.	Local	c.	Global	
b.	Form-level	d.	Special	

	60.	Which type of variable can only hold true or false
a.	Byte	c.	Object	
b.	String	d.	Boolean	

	61.	An operation called ___________________ allows you to add text to an existing string.
a.	text building 	c.	concatenation	
b.	substitution	d.	appending	

	62.	Using Modified-Hungarian notation on a combo box would mean using ____ as prefix.
a.	combo	c.	cmb	
b.	com	d.	cbo	

	63.	In Visual Basic .NET, the ______________ is used to assign values and to compare values to determine if they are equal.
a.	equal sign (=)	c.	greater than sign ( > )	
b.	not equal sign (<>)	d.	less than sign ( < )	

	64.	A __________________ allows a program to ask the user a Yes or No question or to turn an option on or off.
a.	Textbox	c.	check box	
b.	command button	d.	label box	

	65.	In the order of operations, ___________________ are processed after the mathematical and comparison operators.
a.	logical operators	c.	subtraction	
b.	parentheses	d.	concatenation	

	66.	Programmers often use _______________ to plan and document program code.
a.	flowcharts	c.	If statements	
b.	whiteboards	d.	graphs	

	67.	When working with the Toolbar Button’s collection, use this property to select the image from the imagelist control
a.	index	c.	imagelist	
b.	imageindex	d.	listindex	

	68.	The _______ operator reverses the value of a Boolean.
a.	Reverse	c.	Or	
b.	And	d.	Not	

	69.	The operator for greater than or equal to is
a.	<=	c.	>=	
b.	<>	d.	>	

	70.	The Select Case statement ends with an ___________________________.
a.	End If statement	c.	End Select statement	
b.	End Case statement	d.	End Sub statement	

	71.	When a form is loaded and opened by a program, a(n) _______________________ is triggered.
a.	Start event	c.	Open event	
b.	Load event	d.	Begin event	

	72.	By nesting ___________________, you can make decisions that branch in more than two paths.
a.	GroupBoxes	c.	If statements	
b.	Option buttons	d.	Event statements	

	73.	The property that holds information about if a Radio button has been selected is called the __________ property.
a.	Value	c.	Radio	
b.	Checked	d.	Selected	

	74.	The Case statement that executes if no options are selected is ______________.
a.	Case Default	c.	Case Last	
b.	Case Else	d.	Case None	

	75.	A __________________ loop is used when you want a block of code to repeat as long as a condition remains True.
a.	Do Until	c.	Do Unless	
b.	Do While	d.	Do Except	

	76.	To count backwards, use a __________________ after the Step keyword.
a.	Large number	c.	negative value	
b.	Boolean flag	d.	positive value	

	77.	The ___________________ is specifically designed for repeating a block of statements a specific number of times.
a.	Do While loop	c.	Select Case statement	
b.	Do Until loop	d.	For Next loop	

	78.	To add an item to a list box use the __________________.
a.	Items.Add method	c.	Add.Item method	
b.	Add method	d.	Items method	

	79.	Which keyword is optional in a For Next loop.
a.	For	c.	Step	
b.	Next	d.	To	

	80.	A counter variable is usually
a.	a Boolean	c.	a Double	
b.	an Integer	d.	a String	
	81.	When an array is passed to a subroutine which method can be used to find the number of elements in the array.
a.	GetUpperBound	c.	GetLowerBound	
b.	GetTopElement	d.	Length	

	82.	Which is not true about the elements in an array.
a.	they all have the same name	c.	they are identified by an index	
b.	they all have the same type	d.	they all have the same value	

	83.	A data structure that works on a “key-value” principle is a(n) _____ . 
a.	Array	c.	Hashtable	
b.	Collection	d.	Enumeration	

	84.	If you are using Property .. End Property method, VB.NET will automatically provide the following.
a.	Get .. End Get	c.	Both a and b	
b.	Set .. End Set	d.	None of the above	

	85.	The number of elements in the array is always
a.	the same as the upper bound	c.	one more then the upper bound	
b.	one less then the upper bound	d.	one more then the lower bound	

	86.	A loop can process an array by using ____________ as an index.
a.	the loop control variable	c.	a global variable	
b.	the Step value 	d.	a constant	

	87.	When designing windows forms, the controls are placed in the _____ corner.
a.	Top, right	c.	Bottom, right	
b.	Top, left	d.	Bottom, left	

	88.	Before an array can be used if must
a.	be declared	c.	be empty	
b.	have its values assigned	d.	be enabled	

	89.	VB.NET uses indexes for a number of objects and methods. What is the first value for an index by default?
a.	-1	c.	0	
b.	1	d.	100	

	90.	The elements in an initialization list are enclosed in
a.	curly braces	c.	parentheses	
b.	square brackets	d.	quotes	
	91.	Which of the following languages is a part of the .NET framework?
a.	C	c.	C#	
b.	SmallTalk	d.	Java	

	92.	A(n) ____ is a thing that has attributes and behaviors.
a.	method	c.	procedure	
b.	object	d.	phase	

	93.	____ means that an object has attributes and methods combined into one unit.
a.	Inheritance	c.	Iteration	
b.	Encapsulation	d.	Association	

	94.	When an object is created for a class, the class can be said to be ____.
a.	encapsulated	c.	duplicated	
b.	converted	d.	instantiated	

	95.	According to the concept of ____, one class of objects can take on characteristics of another class and extend them.
a.	encapsulation	c.	association	
b.	lineage	d.	inheritance	

	96.	One of the benefits of using Object Oriented Programming is ____.
a.	Naturalness	c.	Both a and b	
b.	Code Reuse	d.	None of the above	

	97.	If the Undergraduate class is inherited from the Student class, the Undergraduate class is the ____.
a.	superclass	c.	auxiliary class	
b.	subclass	d.	main class	

98.	Every time you run this piece of code, you have an error. Pick the right solution to replace the code

Dim strName As String
strName=Jeff Gordon

a.	strName=”Jeff Gordon”	c.	Dim strName As text	
b.	strName=(Jeff Gordon)	d.	public strName As String	

	99.	People usually think about their world in terms of ____.
a.	programs	c.	objects	
b.	procedures	d.	classes	

	100.	Object-oriented programming languages come with class ____ that contain predefined classes.
a.	pools	c.	banks	
b.	modules	d.	libraries