"); document.writeln("Name: " + studentName + "
"); document.write("Score: " + numCorrect + " / " + numPossible + " (" + scorePercent + "%)"); if (numSubjective > 0) { document.write("     [" + numSubjective + " subjective "); if (numSubjective == 1) document.write("question"); else document.write("questions"); document.write(" not graded]"); } document.writeln("

"); document.writeln("
" + titleString + "

"); document.writeln(""); currentInstruction = 0; currentNarrative = 0; for (i=0; i < numQuestions; ++i) { if (currentInstruction < numInstructions) { if (instructionIndex[currentInstruction] == i) { document.writeln(""); ++currentInstruction; } } if (currentNarrative < numNarratives) { if (narrativeIndex[currentNarrative] == i) { document.writeln(""); ++currentNarrative; } } document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); } document.writeln("

"); document.writeln(instructionText[currentInstruction]); document.writeln("
 
"); document.writeln("
"); document.writeln(narrativeText[currentNarrative]); document.writeln("
 
"); document.writeln("
" + prefixText[i] + "

" + numberText[i] + " 

" + questionText[i]); document.writeln("

"); document.writeln(""); if (listMap.charAt(i) != "1") { document.writeln(""); document.writeln(""); } document.writeln(""); document.writeln(""); if (showNotes) { document.writeln(""); document.writeln(""); } if (showRef) { document.writeln(""); document.writeln(""); } document.writeln("

RESPONSE: 

" + responseText[i] + "

ANSWER: 

" + answerText[i] + "

NOTES: 

" + notesText[i] + "

REF: 

" + refText[i] + "

"); document.writeln("
 
"); document.writeln("
"); document.writeln(""); document.writeln(""); document.write(""); document.writeln("
 
"); document.writeln("Retake Test"); document.write(""); document.writeln("Help"); document.writeln("
"); document.writeln(""); document.writeln("
Hosted by www.Geocities.ws

"); document.close(); return(false); } function GetResponse(answerIndex, answer) { var listIndex; var responseText; if (listMap.charAt(answerIndex) == "1") { listIndex = answer.selectedIndex; responseText = answer.options[listIndex].text; } else responseText = answer.value; return(responseText); } function ScoreAnswer(answerIndex, responseText) { var listIndex; var answerText; answerText = ansMap[answerIndex]; if (qtypeMap.charAt(answerIndex) == "4") return(NumericCompare(responseText, answerText)); else if (qtypeMap.charAt(answerIndex) == "5") return(MultiCompare(responseText, answerText)); else if (responseText.toUpperCase() == answerText.toUpperCase()) return(true); else return(false); } function BuildPrefixText(answerIndex, responseText, isCorrect) { var text; var listIndex; text = "
"
		if (isCorrect)
			text += ""
		else
			text += ""

		if (listMap.charAt(answerIndex) == "1") {
			if (responseText.length == 0)
				responseText = " ";
			text += " " + responseText + " ";
		}

		text += "
" return(text); } function StripSpaces(s) { var len; var i; len = s.length; for (i=len - 1; i >= 0 && s.charAt(i) == " "; --i) len = i; if (len == 0) s = ""; else if (len != s.length) s = s.substring(0, len); return(s); } function TranslateHtmlString(text) { var newText; var replaceString; var position; var length; var breakPos; var skipExtra; var i; newText = ""; position = 0; length = text.length; while (position < length) { skipExtra = 0; breakPos = -1; for (i=position; i < length && breakPos < 0; ++i) { switch(text.charAt(i)) { case '>': replaceString = ">"; breakPos = i; break; case '<': replaceString = "<"; breakPos = i; break; case '&': replaceString = "&"; breakPos = i; break; case '\r': if ((i + 1) < length && text.charAt(i + 1) == '\n') skipExtra = 1; replaceString = "
"; breakPos = i; break; case '\n': replaceString = "
"; breakPos = i; break; case ' ': if ((i + 1 < length) && text.charAt(i + 1) == ' ') { replaceString = " "; breakPos = i; } break; } } if (breakPos < 0) { newText += text.substring(position, length); position = length; } else { if (breakPos > position) newText += text.substring(position, breakPos); newText += replaceString; position = breakPos + 1 + skipExtra; } } return(newText); } function FixMCNotes(notesText, studentText) { var displayText; var searchText; var upperNotes; var charCode; var startIndex; var endIndex; displayText = ""; if (notesText.length > 0) { if (studentText.length > 0) { upperNotes = notesText.toUpperCase(); studentText = studentText.toUpperCase(); charCode = studentText.charCodeAt(0); searchText = "/" + String.fromCharCode(charCode) + "/"; startIndex = upperNotes.indexOf(searchText); if (startIndex >= 0) { startIndex += searchText.length; searchText = "/" + String.fromCharCode(charCode + 1) + "/"; endIndex = upperNotes.indexOf(searchText, startIndex); if (endIndex < startIndex) endIndex = notesText.length; displayText = notesText.substring(startIndex, endIndex); } } if (displayText.length == 0 && notesText.charAt(0) != "http://www.geocities.com/") displayText = notesText; } return(displayText); } function NumericCompare(s1, s2) { var s1Sign; var s2Sign; var tempString; var decimalCount; var decimalPos; var numToDelete; var len; var ch; var i; s1.toUpperCase(); s2.toUpperCase(); if (s1 == s2) return(true); else { s1Sign = 1; s2Sign = 1; tempString = ""; for (i=0; i < s1.length; ++i) { ch = s1.charAt(i); if (ch == "-" && tempString.length == 0) s1Sign = -1; else if ((ch >= "0" && ch <= "9") || ch == ".") tempString += ch; } s1 = tempString; decimalCount = 0; decimalPos = -1; for (i=0; i < s1.length; ++i) { if (s1.charAt(i) == '.') { ++decimalCount; if (decimalPos < 0) decimalPos = i; } } if (decimalCount == 1 && decimalPos >= 0) { len = s1.length; for (i=len - 1; i >= decimalPos; --i) { if (i == decimalPos || s1.charAt(i) == '0') len = i; else break; } if (len < s1.length) s1 = s1.substring(0, len); if (s1.length == 0) s1 = "0"; } numToDelete = 0; for (i=0; i < s1.length; ++i) { if (s1.charAt(i) == "0") ++numToDelete; else break; } if (numToDelete > 0) { if (numToDelete == s1.length) --numToDelete; if (numToDelete > 0) s1 = s1.substring(numToDelete); } ///////////////////////////////////////////// tempString = ""; for (i=0; i < s2.length; ++i) { ch = s2.charAt(i); if (ch == "-" && tempString.length == 0) s2Sign = -1; else if ((ch >= "0" && ch <= "9") || ch == ".") tempString += ch; } s2 = tempString; decimalCount = 0; decimalPos = -1; for (i=0; i < s2.length; ++i) { if (s2.charAt(i) == '.') { ++decimalCount; if (decimalPos < 0) decimalPos = i; } } if (decimalCount == 1 && decimalPos >= 0) { len = s2.length; for (i=len - 1; i >= decimalPos; --i) { if (i == decimalPos || s2.charAt(i) == '0') len = i; else break; } if (len < s2.length) s2 = s2.substring(0, len); if (s2.length == 0) s2 = "0"; } numToDelete = 0; for (i=0; i < s2.length; ++i) { if (s2.charAt(i) == "0") ++numToDelete; else break; } if (numToDelete > 0) { if (numToDelete == s2.length) --numToDelete; if (numToDelete > 0) s2 = s2.substring(numToDelete); } if (s1Sign == s2Sign && s1 == s2) return(true); } return(false); } function MultiCompare(responseText, answerText) { var startIndex; var endIndex; var partialText; responseText = responseText.toUpperCase(); answerText = answerText.toUpperCase(); startIndex = 0; do { endIndex = answerText.indexOf("\r", startIndex); if (endIndex < 0) partialText = answerText.substring(startIndex); else partialText = answerText.substring(startIndex, endIndex); if (responseText == partialText) return(true); startIndex = endIndex + 1; } while (endIndex > 0); return(false); } function FixMTF(f) { var text; var letter; var theList; var listIndex; var number; var i; for (i=0; i < f.length; ++i) { if (f.elements[i].name.indexOf("MTF:") == 0) { number = parseInt(f.elements[i].name.substring(4), 10); theList = f["MTF-" + number + "-1"]; if (theList) { listIndex = theList.selectedIndex; letter = theList.options[listIndex].text; } else letter = ""; text = StripSpaces(f["MTF-" + number + "-2"].value); if (text == "") f.elements[i].value = letter; else f.elements[i].value = letter + "," + text; } } } function AllowReset() { return(window.confirm("Do you want to clear all of your answers?")); } // -->
 
Name: 
 

Chapter 2 Study Guide



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

1. 

The ____ is part of the Visual Basic .NET application and contains the windows and toolbars that allow you to develop Visual Basic .NET applications and components.
a.
resolution
c.
IDE
b.
VBnet
d.
index
 

2. 

In Visual Basic .NET, a profile is used to store personalized settings that define the ____.
a.
keyboard shortcuts that apply
b.
default filter to use when searching for help
c.
layout of windows in the Visual Basic .NET IDE
d.
any of the above
 

3. 

The ____ setting determines whether Visual Basic .NET looks for Help files on your computer’s hard drive and CD drive, or on the Web.
a.
Show Help
c.
Search Help
b.
Help Filter
d.
Either a or c
 

4. 

The ____ setting tells Visual Basic .NET what tab or page to display in the main work area when you start Visual Basic .NET.
a.
Start Page
c.
At Startup
b.
Home Page
d.
Work Page
 

5. 

When the IDE is in ____ time, you can make modifications to the forms and code of any application or component.
a.
run
c.
modification
b.
design
d.
change
 

6. 

When you first open a project, Visual Basic .NET enters a mode in the IDE called ____ time.
a.
run
c.
modification
b.
design
d.
change
 

7. 

The ____ menu command on the toolbar shortcut menu allows you to change the toolbars to fit your own needs by adding, deleting, and modifying toolbar buttons.
a.
Make Toolbar
c.
Design
b.
Control
d.
Customize
 

8. 

Which of the following buttons does the Standard toolbar contain ____.
a.
Center Horizontally
c.
Open Project
b.
Align to Grid
d.
all of the above
 

9. 

Which of the following displays information about the current state of the Visual Basic .NET IDE?
a.
taskbar
c.
menu bar
b.
status bar
d.
IDE bar
 

10. 

You can press the ____ key on the keyboard to change the status between Overtype and Insert mode.
a.
HOME
c.
SHIFT
b.
INSERT
d.
F6
 

11. 

Which of the following presents information about the location of the insertion point and the progress of current tasks?
a.
taskbar
c.
menu bar
b.
status bar
d.
IDE bar
 

12. 

When a project is opened, Visual Basic .NET opens the project within a ____.
a.
solution
c.
data file
b.
panel
d.
all of the above
 

13. 

A(n) ____ view is a hierarchical list of items.
a.
indexed
c.
form
b.
pane
d.
tree
 

14. 

Which of the following is a file of code that includes information for the Visual Basic .NET compiler?
a.
CLR
c.
References
b.
Form1.vb
d.
AssemblyInfo.vb
 

15. 

You can ____ projects within the Visual Basic .NET IDE in order to test the functionality of the applications that you develop.
a.
bug
c.
concatenate
b.
compile
d.
run
 

16. 

To make changes to an object on a user interface, you click the item and then change the values of its properties in the ____ window.
a.
Attributes
c.
Properties
b.
Object
d.
Edit
 

17. 

When you are programming, the main work area of the Visual Basic .NET IDE displays the ____ window.
a.
menu
c.
programming
b.
code
d.
Properties
 

18. 

The ____ window includes an Object box and a Procedure box at the top of the window.
a.
tasks
c.
code
b.
Properties
d.
Objects
 

19. 

Collapse and expand buttons on the left side of the code window indicate code ____.
a.
regions
c.
panels
b.
folders
d.
indices
 

20. 

Which of the following next to a code region indicates that the code is collapsed?
a.
green bullet
c.
plus sign
b.
minus sign
d.
red bullet
 

21. 

Clicking the ____ button saves all the files associated with a project.
a.
Total Save
c.
Save All
b.
Save
d.
Save Selected Items As
 

22. 

You can type a topic in the ____ box to display a list of items related to that topic in the Index window in the Visual Basic .NET Help system.
a.
Index Topic
c.
Search
b.
Look for
d.
Display
 

23. 

By default, the Dynamic Help window displays in the same window area as the ____ window.
a.
Properties
c.
Tasks
b.
Objects
d.
Tools
 

24. 

You can access Help in many areas of the Visual Basic .NET IDE by pressing the ____ key.
a.
CTRL
c.
ESC
b.
HOME
d.
F1
 

25. 

To hide a Help window, ____ the tab of the window and click Hide on the shortcut menu.
a.
click
c.
double-click
b.
right-click
d.
triple-click
 

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

26. 

Many programmers find it convenient to display as many of the windows and toolbars as possible while working in the Visual Basic .NET IDE.
 

27. 

Professional software programmers typically work in as low a resolution as their computer will allow to display many of the IDE’s tools at all times.
 

28. 

Some programmers work with multiple monitors attached to the same computer to see as much information as possible at once.
 

29. 

Each time you start Visual Basic .NET, you must adjust the windows and toolbars to the settings and positions you desire.
 

30. 

After you choose a profile, Visual Basic .NET remembers it for the next time you use Visual Basic .NET on that computer.
 

31. 

Setting the Screen Display to Visual Basic 6 customizes the screen to automatically display the Toolbox window because Visual Basic developers typically use the Toolbox often.
 

32. 

Setting the Help Filter to Visual Basic filters the large quantity of information in the Help system to focus on information most useful to a Visual Basic developer.
 

33. 

When Visual Basic .NET starts, you can choose to open an existing project or file or start a new project.
 

34. 

The Find Samples tab of the Get Started view of the Start Page lists the name and last modified date for any projects you have recently worked on.
 

35. 

When you first open a project, Visual Basic .NET enters a mode in the IDE called run time.
 

36. 

When the IDE is in modification time, you can make modifications to the forms and code of any application or component.
 

37. 

When the IDE is in design time, the word, [design], displays in the title bar of the Visual Basic .NET window.
 

38. 

The same windows and toolbars always display in the Visual Basic .NET IDE, regardless of the task you are performing and the options you choose.
 

39. 

The Visual Basic .NET IDE consists of several toolbar and window areas.
 

40. 

If you right-click any toolbar in the Visual Basic .NET IDE, a shortcut menu displays that lists all the available toolbars in Visual Basic .NET.
 

41. 

The Standard and Layout menus allow you to perform common tasks more quickly than when using toolbars.
 

42. 

The check mark on the toolbars shortcut menu indicates the toolbar(s) set to display.
 

43. 

Status indicators on the status bar can be double-clicked to turn certain keys or modes on or off.
 

44. 

As you perform tasks in the IDE, Visual Basic .NET automatically opens different windows to help you complete the task.
 

45. 

You work on one solution at a time in Visual Basic .NET.
 

46. 

Solutions can contain at most one project.
 

47. 

You can only run one instance of Visual Basic .NET at a time.
 

48. 

Each individual project within the .NET architecture is written in one programming language, such as Visual Basic .NET or Visual C++ .NET.
 

49. 

A project can contain up to three different components.
 

50. 

When you start a new project to build a Windows application, Visual Basic .NET creates at least three files with the project: References, AssemblyInfo.vb, and a default form.
 

51. 

The information in AssemblyInfo.vb uniquely identifies the project to the References file.
 

52. 

You will need to become very familiar with the References and AssemblyInfo.vb files, as they are modified often during the programming of a solution.
 

53. 

When run time begins, the IDE changes significantly, closing some windows and opening others, and displaying the application in a window in the IDE.
 

54. 

When users run your application, they will need to use the Visual Basic .NET IDE.
 

55. 

Running your projects allows you to check for bugs introduced into your code and verify that the project displays and behaves correctly.
 

56. 

The Text property is the only property for the Label control.
 

57. 

The individual forms, controls, and classes included in a project are all methods.
 

58. 

Visual Basic .NET allows you to define your own code regions.
 

59. 

The code window functions as a text editor for writing code statements.
 

60. 

Visual Basic .NET projects are saved as a set of objects.
 

61. 

Before starting a new Visual Basic .NET project or quitting Visual Basic .NET, you should save your work.
 

62. 

Visual Basic .NET will not automatically save your project when you run it, so you should be sure to do so.
 

63. 

If you want to save your work with a different file name or to a different folder or drive, click the Save Selected Items As command on the File menu.
 

64. 

If you are changing one file in a large project, then use the Save All button, which only saves project files if they were changed.
 

65. 

You should test changes frequently as you are working on a project.
 

66. 

Documentation can be electronic or printed.
 

67. 

A printed record can make it easier to check your program or refine it.
 

68. 

Often, project requirements dictate that you archive a hard-copy output of an application’s code and user interface to share with a client or other developers.
 

69. 

To print a copy of the user interface, click the Print command on the File menu.
 

70. 

If the Print to file check box is selected in the Print dialog box, the print output is sent to the file specified in the Print To File dialog box that displays after you click the OK button in the Print dialog box.
 

71. 

The Contents, Index, and Locate Help menu commands displays content from the Visual Basic .NET Help system.
 

72. 

After the Search feature in the Help system locates topics related to the search term entered in the Search window, it then displays the results in the Index window.
 

73. 

As you navigate around the IDE, open new windows, or select items on a form, Dynamic Help automatically updates itself with relevant information.
 

74. 

One way to access Dynamic Help is to click the Dynamic Help tab next to the Properties tab in the Properties window.
 

75. 

The Dynamic Help window contains Contents, Index, and Search buttons on its toolbar.
 

Completion
Complete each sentence or statement.
 

76. 

A(n) ____________________ is a collection of code and other files that usually encompasses one application or class.
 

 

77. 

The ________________________________________, or IDE, is part of the Visual Basic .NET application and contains the windows and toolbars that allow you to develop Visual Basic .NET applications and components.
 

 

78. 

A(n) ____________________ is used to store personalized settings that define the layout of windows in the Visual Basic .NET IDE, keyboard shortcuts that apply, the default filter to use when searching for help, and other options.
 

 

79. 

The ____________________ displays the Visual Basic .NET menu names, each of which represents a list of commands that allow you to create, edit, save, print, test, and run a Visual Basic .NET application or component.
 

 

80. 

The ____________________ toolbar contains buttons that execute commonly used commands, such as Open Project, Save, Cut, Copy, Paste, and others.
 

 

81. 

The ____________________ toolbar contains buttons that execute commonly used formatting commands such as Align to Grid, Size to Grid, Center Horizontally, Center Vertically, and others.
 

 

82. 

When you move the mouse pointer over a button or box, the name of the button displays below it in a(n) ____________________.
 

 

83. 

The ____________________ is located above the Windows taskbar at the bottom of the Visual Basic .NET window.
 

 

84. 

When the mode is ____________________, Visual Basic .NET is waiting for you to perform a task.
 

 

85. 

When Visual Basic .NET is in ____________________ mode, existing characters are replaced as you type.
 

 

86. 

A(n) ____________________ is a grouping of projects and related files.
 

 

87. 

A tree ____________________ is a hierarchical list of items.
 

 

88. 

The ____________________ file provides a tree view of .NET classes that are needed in an application.
 

 

89. 

When you ____________________ a project, the project is loaded into memory and the program code is executed by the .NET architecture.
 

 

90. 

By running your projects often during the development phase, you can check for any problems, or ____________________, that you might have introduced into your code inadvertently.
 

 

91. 

When you run a project, the IDE enters a mode called ____________________ time.
 

 

92. 

A(n) ____________________ control is a Visual Basic .NET control used to display text information on a Windows form.
 

 

93. 

A(n) ____________________ is a characteristic or attribute of an object, such as its background color or the text that it displays.
 

 

94. 

The ____________________ window lists the attributes for the object currently selected in the main work area.
 

 

95. 

The ____________________ box in the Properties window displays the name of the currently selected object or control.
 

 

96. 

The ____________________ list displays the set of properties and current value of the properties for the object or control named in the Object box.
 

 

97. 

The ____________________ window provides an area where you can view and edit code.
 

 

98. 

The ____________________ box of the code window includes a list of all of the individual forms, controls, and classes included in a project.
 

 

99. 

The ____________________ box allows you to select individual procedures, or pieces of code, that are associated with the object currently selected in the Object box.
 

 

100. 

____________________ are words that have special meaning within Visual Basic .NET and provide a vocabulary for the Visual Basic .NET language.
 

 

101. 

A code ____________________ is a group of related lines of code.
 

 

102. 

If you need to work with multiple sections of code at the same time, the ____________________ allows you to create two or more windows within the code window.
 

 

103. 

The process of making your code work as expected is known as ____________________.
 

 

104. 

____________________ an application refers to producing a record of the design and code used to create an application.
 

 

105. 

The ____________________ command is available on the File menu when the active window contains printable items, such as code, Help topics, Web pages, or other printable output.
 

 

106. 

Visual Basic .NET ____________________ contains documents, examples, articles, and other information about the Visual Basic .NET language and environment to assist you in using Visual Basic .NET.
 

 

107. 

The ____________________ window displays a listing of Help topics arranged much like a table of contents in a book.
 

 

108. 

The ____________________ window provides a navigational aid for the Help system, similar to a book index.
 

 

109. 

The ____________________ window allows you to search the Visual Basic .NET Help system for a specific term or phrase.
 

 

110. 

____________________ Help displays help for whatever task or window you are working with in the IDE.
 

 



 
Check Your Work     Reset Help
Hosted by www.Geocities.ws

1