Microsoft Visual Basic 2010 for Windows Web Office and Database Applications Comprehensive 1st Edition by Gary B. Shelly – Test Bank A+

$35.00
Microsoft Visual Basic 2010 for Windows Web Office and Database Applications Comprehensive 1st Edition by Gary B. Shelly – Test Bank A+

Microsoft Visual Basic 2010 for Windows Web Office and Database Applications Comprehensive 1st Edition by Gary B. Shelly – Test Bank A+

$35.00
Microsoft Visual Basic 2010 for Windows Web Office and Database Applications Comprehensive 1st Edition by Gary B. Shelly – Test Bank A+
  1. ____ is a fundamental process that repeats instructions until a condition is true or while a condition is true.
a.Iterationc.Looping
b.Concatenationd.Documenting

ANS: A, C PTS: 1 REF: 378

  1. Instead of typing the menu name on a MenuStrip object, you can add a ____ by clicking the Type Here box’s list arrow and selecting the appropriate choice
a.radio buttonc.menu item
b.combo boxd.text box

ANS: B, C, D PTS: 1 REF: 383

  1. A compound operator allows you to ____ values, storing the result in the same variable.
a.addc.compare
b.multiplyd.divide

ANS: A, C, D PTS: 1 REF: 396

  1. The ____ values used in a For…Next loop can vary based on input from a user.
a.beginningc.ending
b.stepd.range

ANS: A, B, C PTS: 1 REF: 404

  1. The Publish Wizard allows you to create an install file to be placed on a ____.
a.floppy diskc.Web server
b.network drived.hard drive

ANS: B, C, D PTS: 1 REF: 426

MODIFIED TRUE/FALSE

  1. When used in a menu name, the asterisk character is used to indicate that a character is a hot key. _________________________

ANS: F, ampersand

PTS: 1 REF: 383

  1. Menu item hot keys are case sensitive. _________________________

ANS: F, are not

PTS: 1 REF: 385

  1. Double-clicking a menu item in design mode opens the code editing window to the Click event handler for that menu item. _________________________

ANS: T PTS: 1 REF: 385

  1. Smart actions can be specified for a menu by using Action Tags. _________________________

ANS: T PTS: 1 REF: 386

  1. The Checked property of a ListBox object identifies which item in the ListBox has been selected. _________________________

ANS: F, SelectedItem

PTS: 1 REF: 395

MULTIPLE CHOICE

  1. A(n) ____ is a group of commands presented in a list.
a.action listc.menu
b.input boxd.status bar

ANS: C PTS: 1 REF: 380

  1. The ____ prefix is used for a MenuStrip object.
a.menuc.mst
b.mnsd.mnu

ANS: D PTS: 1 REF: 382

  1. The ____ character is used to indicate that a letter is a hot key on a menu item.
a.ampersand (&)c.back slash ()
b.forward slash (/)d.underscore (_)

ANS: A PTS: 1 REF: 383

  1. The hot key for a menu item can be activated with the keyboard by pressing the ____ key and the hot key at the same time.
a.ALTc.CTRL
b.SHIFTd.TAB

ANS: A PTS: 1 REF: 383

  1. A(n) ____ key is a keyboard shortcut for opening a menu.
a.hotc.legend
b.spotd.index

ANS: A PTS: 1 REF: 383

  1. As shown in the accompanying figure, Visual Basic 2010 contains a(n) ____ Tag that allows you to create a full standard menu bar commonly provided in Windows programs.
a.Menuc.Legend
b.Actiond.Glossary

ANS: B PTS: 1 REF: 386

  1. The feature shown in the accompanying figure provides an easy way for you to specify ____ actions for an object as you design a form.
a.baselinec.indexed
b.smartd.object-oriented

ANS: B PTS: 1 REF: 386

  1. The ____ function provides a dialog box that asks the user for input and provides an input area.
a.InputAreac.MessageBox
b.InputBoxd.UserEntry

ANS: B PTS: 1 REF: 387

  1. A ____ object displays a collection of items, or values, with one item per line.
a.TextBoxc.ListBox
b.RadioButtond.CheckBox

ANS: C PTS: 1 REF: 390

  1. Which line of code will add the value “East” to a ListBox object named lstDirections?
a.lstDirections.Add(“East”)c.lstDirections.AddValue(“East”)
b.lstDirections.Items.Add(“East”)d.lstDirections.Items.AddValue(“East”)

ANS: B PTS: 1 REF: 391

  1. To remove all objects from a ListBox object, the ____ method is used.
a.Clearc.Empty
b.Items.Cleard.Items.Empty

ANS: A PTS: 1 REF: 392

  1. The ____ property of a ListBox object identifies which item in the ListBox was selected.
a.Itemc.Selected
b.ItemSelectedd.SelectedItem

ANS: D PTS: 1 REF: 395

  1. A(n) ____ variable collects a total value over a period of time.
a.catalogc.register
b.glossaryd.accumulator

ANS: D PTS: 1 REF: 396

  1. A(n) ____ variable keeps track of how many times a loop has executed.
a.counterc.glossary
b.accumulatord.register

ANS: A PTS: 1 REF: 396

  1. A ____ operator allows you to perform arithmetic operations with a variable and store the results back to that variable.
a.logicalc.compressed
b.rationald.compound

ANS: D PTS: 1 REF: 396

  1. The compound operator ____ adds the value of the right operand to the value of the left operand and stores the result in the left operand’s variable.
a.++c.=+
b.+=d.==

ANS: B PTS: 1 REF: 397

  1. The compound operator ____ is used to add a string to an existing string.
a.&=c.&&
b.=&d.==

ANS: A PTS: 1 REF: 397

  1. A(n) ____ is a single repetition of a loop.
a.rotationc.revolution
b.iterationd.accumulation

ANS: B PTS: 1 REF: 399

  1. A ____ loop is best used when the specific number of iterations required is known.
a.Do…Whilec.For…Next
b.Do…Untild.For…Until

ANS: C PTS: 1 REF: 399

  1. A loop’s ____ variable is a numeric variable that keeps track of the number of iterations the loop completes.
a.compoundc.matrix
b.accumulatedd.control

ANS: D PTS: 1 REF: 399

  1. The ____ follows the keyword For in a For…Next loop.
a.keyword Nextc.keyword To
b.keyword Stepd.control variable

ANS: D PTS: 1 REF: 399

  1. A For…Next loop with a beginning value of 1, an ending value of 25, and a Step value of 3 will execute ____ times.
a.3c.9
b.8d.25

ANS: C PTS: 1 REF: 400

  1. How many times will the following loop execute?

For intCount = 10 To 16 Step 2

‘Body of Loop

Next

a.3c.6
b.4d.7

ANS: B PTS: 1 REF: 400

  1. How many times will the following loop execute?

For intCount = 10 To 1 Step -2

‘Body of loop

Next

a.4c.9
b.5d.10

ANS: B PTS: 1 REF: 401

  1. If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will execute as long as a condition remains true.
a.Loop Whilec.Loop Until
b.Do Whiled.Do Until

ANS: B PTS: 1 REF: 406

  1. A ____-controlled loop tests the condition before the loop body is executed.
a.bottomc.top
b.keyd.function

ANS: C PTS: 1 REF: 406

  1. A ____-controlled loop tests the condition after the code in the loop body has been executed.
a.bottomc.top
b.functiond.key

ANS: A PTS: 1 REF: 406

  1. If ____ appears as the last line of a loop, the loop is a bottom-controlled Do loop that will execute as long as a condition remains true.
a.Loop Whilec.Loop Until
b.Do Whiled.Do Until

ANS: A PTS: 1 REF: 409

  1. If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will stop execution when a condition becomes true.
a.Loop Whilec.Loop Until
b.Do Whiled.Do Until

ANS: D PTS: 1 REF: 410

  1. If ____ appears as the last line of a loop, the loop is a bottom-controlled Do loop that will stop execution when a condition becomes true.
a.Loop Whilec.Until
b.Do Whiled.Loop Until

ANS: D PTS: 1 REF: 412

  1. As demonstrated in the accompanying figure, a loop that does not terminate is called a(n) ____ loop.
a.breakawayc.runaway
b.infinited.unstoppable

ANS: B PTS: 1 REF: 412

  1. Using a preset value for the variable tested in a loop condition is a process called ____ the loop.
a.iteratingc.presetting
b.primingd.rebanding

ANS: B PTS: 1 REF: 413

  1. The ____ function can be used to test if data entered by the user is numeric.
a.IsIntegerc.IsNumeric
b.IsNumberd.IsNonAlpha

ANS: C PTS: 1 REF: 414

  1. What will be the value of the variable intTotalCount when the following code is executed?

For intOuterCount = 1 to 5

For intInnerCount = 1 to 4

intTotalCount +=1

Next

Next

a.4c.9
b.5d.20

ANS: D PTS: 1 REF: 416

  1. When in break mode, you can use ____ to examine the value of variables.
a.DataTagsc.DebugTags
b.DataTipsd.DebugTips

ANS: B PTS: 1 REF: 417

  1. As shown in the accompanying figure, ____ are stop points placed in the code to tell Visual Studio 2010 debugger where and when to pause the execution of the program.
a.breakpointsc.halt points
b.debug pointsd.tracepoints

ANS: A PTS: 1 REF: 417

  1. By default, when a program reaches the item shown in the accompanying figure and pauses execution, the line of code that is about to be executed is highlighted in what color?
a.bluec.red
b.greend.yellow

ANS: D PTS: 1 REF: 421

  1. You can create a deployed version of a program by using the ____ process.
a.ClickDeploy Installationc.ClickOnce Deployment
b.ClickInstall Deploymentd.ClickPublish Deployment

ANS: C PTS: 1 REF: 425

  1. Before deployment, an application should be ____.
a.completec.debugged
b.working properlyd.all of the above

ANS: D PTS: 1 REF: 425

  1. In order to run a program deployed with ClickOnce Deployment, the computer needs ____ installed on it.
a.Microsoft Wordc.PowerBuilder
b.Visual Studio 2010d.none of the above

ANS: D PTS: 1 REF: 425

TRUE/FALSE

  1. MenuStrip objects can be placed along any edge of the form, depending on which side is closer to the mouse pointer.

ANS: F PTS: 1 REF: 382

  1. A hot key in a menu name must be the first letter.

ANS: F PTS: 1 REF: 384

  1. Writing an event handler for a menu item is the same as writing an event handler for a button click.

ANS: T PTS: 1 REF: 385

  1. The InputBox function returns a null string (“”) when a user clicks the Cancel button.

ANS: T PTS: 1 REF: 387

  1. The prompt message displayed in an InputBox object can be customized by the programmer.

ANS: T PTS: 1 REF: 387

  1. If the user enters a numeric value in an InputBox object, the InputBox function will return a numeric data type.

ANS: F PTS: 1 REF: 388

  1. All data collected by an InputBox object is automatically converted to the best data type for the data.

ANS: F PTS: 1 REF: 388

  1. An InputBox object allows user input without the need for a TextBox object on the Windows Form object.

ANS: T PTS: 1 REF: 388

  1. When the user clicks the Cancel button in an input box and the InputBox function returns a null character, the program can test for the null character to determine further processing.

ANS: T PTS: 1 REF: 389

  1. You must include a Step value in a For…Next loop, even if the Step value is 1.

ANS: F PTS: 1 REF: 400

  1. The beginning and ending values for a For…Next loop must be predefined and cannot contain an expression.

ANS: F PTS: 1 REF: 401

  1. The Step value for a For…Next loop must be a positive whole integer value.

ANS: F PTS: 1 REF: 401

  1. A Step value in a For…Next loop can be positive or negative.

ANS: T PTS: 1 REF: 401

  1. It is best to indent the body of the loop, to identify clearly the code that is being repeated.

ANS: T PTS: 1 REF: 403

  1. The beginning, ending, and step values used in a For…Next loop can vary based on input from a user.

ANS: T PTS: 1 REF: 404

  1. In a Do While loop, the body of the loop is executed until the condition becomes true.

ANS: F PTS: 1 REF: 406

  1. A top-controlled loop is always executed at least once.

ANS: F PTS: 1 REF: 406

  1. Starting a loop with a preset value for the variable tested in the condition is called priming the loop.

ANS: T PTS: 1 REF: 413

  1. When expecting a number from an input box, the IsNumeric function should be used to ensure that the input data can be converted to a numeric variable.

ANS: T PTS: 1 REF: 414

  1. Loops cannot be nested.

ANS: F PTS: 1 REF: 416

  1. When nesting loops, the inner loop must be completely contained in the outer loop and must use a different control variable.

ANS: T PTS: 1 REF: 422

  1. Use a For…Next loop when the number of repetitions is unknown.

ANS: F PTS: 1 REF: 417

  1. Breakpoints are stop points placed in the code where execution will be paused during the execution of the program, and enter debug mode.

ANS: F PTS: 1 REF: 417

  1. Only one breakpoint can be set in a program, as shown in the accompanying figure.

ANS: F PTS: 1 REF: 423

  1. The installation files created by the ClickOnce Publishing Wizard can be used for a software release.

ANS: T PTS: 1 REF: 429

COMPLETION

  1. A(n) ____________________ is a strip across the top of a window that contains one or more menu names.

ANS: menu bar

PTS: 1 REF: 380

  1. A(n) ____________________ is a group of commands, or items, presented in a list.

ANS: menu

PTS: 1 REF: 380

  1. In Visual Studio 2010, a(n) ____________________ object is used to place menus at the top of a Windows Application form.

ANS: MenuStrip

PTS: 1 REF: 381

  1. The non-graphical Toolbox objects, such as MenuStrip objects, are organized and displayed below the form in the ____________________ at the bottom of the Visual Studio interface.

ANS: Component Tray

PTS: 1 REF: 382

  1. The ____________________ procedure of the Windows Form object closes the form and causes the program to exit.

ANS: Close

PTS: 1 REF: 385

  1. A(n) ____________________ object is a dialog box that prompts the user to enter a value.

ANS: InputBox

PTS: 1 REF: 387

  1. The values in a ListBox are called ____________________.

ANS: items

PTS: 1 REF: 390

  1. The ____________________ property of a ListBox identifies which item is selected.

ANS: SelectedItem

PTS: 1 REF: 395

  1. The keyword ____________________ is the last line of a For loop.

ANS: Next

PTS: 1 REF: 399

  1. A(n) ____________________ value is the value in a For…Next loop that is added to, or subtracted from, the beginning value on each iteration of the loop.

ANS:

Step

step

PTS: 1 REF: 400

  1. A(n) ____________________ loop should be used when the iterations should continue while or until a condition is true or false.

ANS: Do

PTS: 1 REF: 405

  1. A(n) ____________________ loop should be used when the iterations should continue as long as a condition remains true.

ANS: Do While

PTS: 1 REF: 405

  1. A(n) ____________________ loop should be used when the iterations should continue until a condition becomes true.

ANS: Do Until

PTS: 1 REF: 406

  1. A(n) ____________________ loop is a loop placed completely inside another loop.

ANS: nested

PTS: 1 REF: 416

  1. The process of ____________________ involves resolving defects in the program code.

ANS: debugging

PTS: 1 REF: 417

  1. A(n) ____________________ is used to pause the execution of code while debugging.

ANS: breakpoint

PTS: 1 REF: 417

  1. While in break mode, you can examine the values in all variables that are within the scope of execution through the use of ____________________.

ANS: DataTips

PTS: 1 REF: 417

  1. After an application is completely debugged and working properly, you can ____________________ it.

ANS: deploy

PTS: 1 REF: 425

  1. In Visual Basic 2010, a deployed program can be created easily by using ____________________ Deployment.

ANS: ClickOnce

PTS: 1 REF: 425

  1. The ____________________ Wizard is used to publish a program using ClickOnce Deployment.

ANS: Publish

PTS: 1 REF: 426

MATCHING

Identify the letter of the choice that best matches the phrase or definition.

a.ListBoxf.For…Next
b.wizardg.breakpoint
c.bottom-controlledh.looping
d.infinitei.InputBox
e.accumulatorj.Do Until

  1. The process of repeating a set of instructions while a condition is true or until a condition is true

  1. Objects that can be assigned a default value representing the most likely user input

  1. Used to publish a program using ClickOnce Deployment

  1. Items added to this kind of object during design phase are available for selection by the user during program execution

  1. A variable that contains an accumulated value such as a running total

  1. Loop that should be used when code is to be executed a known, exact number of times

  1. Loop in which the body of the loop is executed until the condition becomes true

  1. A loop that is always executed at least once

  1. A loop that never ends

  1. Identified in the code editor with a bullet to the left of the line number and highlighting of the code on that line

  1. ANS: H PTS: 1 REF: 378

  1. ANS: I PTS: 1 REF: 388

  1. ANS: B PTS: 1 REF: 426

  1. ANS: A PTS: 1 REF: 393

  1. ANS: E PTS: 1 REF: 396

  1. ANS: F PTS: 1 REF: 399

  1. ANS: J PTS: 1 REF: 406

  1. ANS: C PTS: 1 REF: 406

  1. ANS: D PTS: 1 REF: 412

  1. ANS: G PTS: 1 REF: 419

ESSAY

  1. Explain what a compound operator is, and of what it consists.

ANS:

A compound operator allows you to add, subtract, multiple, divide, use modulus or exponents, or concatenate strings, storing the result in the same variable. An assignment statement that includes a compound operator begins with the variable that will contain the accumulated value, such as an accumulator or a counter, followed by the compound operator. A compound operator consists of an arithmetic operator and an equal sign. The last element in the assignment statement is the variable or literal containing the value to be used in the calculation

PTS: 1 REF: 396 TOP: Critical Thinking

  1. How does a Do loop work? What is the difference between a Do While loop and a Do Until loop? A top-controlled loop and a bottom-controlled loop?

ANS:

In a Do loop, the body of the loop is executed while or until a condition is true or false. The Do loop uses a condition similar to an If…Then decision structure to determine whether it should continue looping. In this way you can use a Do loop to execute a body of statements an indefinite number of times.

Visual Basic 2010 provides two types of Do loops: the Do While loop and the Do Until loop. Both Do loops execute statements repeatedly until a specified condition becomes true or false. Each loop examines a condition to determine whether the condition is true. The Do While loop executes as long as the condition is true.

The Do Until loop executes until the condition becomes true.

Do loops are either top-controlled or bottom-controlled, depending on whether the condition is tested before the loop begins or after the body of the loop has executed one time. A top-controlled loop is tested before the loop is entered; the body of a top-controlled loop might not be executed at all because the condition being tested might be true before any processing in the loop occurs.

Bottom-controlled loops test the condition at the bottom of the loop, so the body of a bottom-controlled loop is executed at least once..

PTS: 1 REF: 405-406 TOP: Critical Thinking

  1. Discuss what a breakpoint is and how to use it.

ANS:

A good way to collect information is to pause the execution of the code where a possible error could occur. One way to pause execution is to use breakpoints. Breakpoints are stop points placed in the code to tell the Visual Studio 2010 debugger where and when to pause the execution of the application. During this pause, the program is in break mode. While in break mode, you can examine the values in all variables that are within the scope of execution through the use of DataTips.

PTS: 1 REF: 417 TOP: Critical Thinking

CASE

Critical Thinking Questions

Case 6-1

Chris is trying to decide which kind of loop is the best loop for him to use to solve a couple of different programming challenges that he faces.

  1. Chris knows the exact number of repetitions he needs the loop to execute. Which of the following is the best choice for him?
a. top-controlled Do Whilec. bottom-controlled Do While
b. bottom-controlled Do Untild. For…Next

ANS:

D

PTS: 1 REF: 417

  1. Chris wants to guarantee that the instructions within the loop are executed one time regardless of the status of a condition. Which of the following should he use?

a. bottom-controlled Do Untilc. For…Next
b. top-controlled Do Untild. top-controlled Do While

ANS:

A

PTS: 1 REF: 417

Critical Thinking Questions

Case 6-2

Robin thinks that she has a good handle on the use of compound operators but she wants to do a couple of sample problems just to make certain. In both of the problems below, Robin assumes that intResult = 24.

  1. When Robin correctly calculates intResult -= 3, what value does she get?

a. 18c. 72
b. 21d. None of the above

ANS:

B

PTS: 1 REF: 397

  1. When Robin correctly calculates intResult ^= 2, what value does she get?

a. 22c. 48
b. 24d. 576

ANS:

D

PTS: 1 REF: 397

Chapter 7: Creating Web Applications

MULTIPLE CHOICE

  1. A(n) ____ form is a page displayed in a browser that requests data from the user.
a.indexedc.ASP
b.Webd.ISP

ANS: B PTS: 1 REF: 474

  1. A Web ____ is a computer that stores Web documents and makes them available to users over the Internet.
a.clientc.server
b.baselined.broadband

ANS: C PTS: 1 REF: 476

  1. A Web page that displays information such as text and pictures with no interactivity is called a ____ Web page.
a.dynamicc.nonindexed
b.standardd.static

ANS: D PTS: 1 REF: 476

  1. A Web page that allows users to enter information is considered a(n) ____ Web page.
a.dynamicc.standard
b.staticd.interactive

ANS: A PTS: 1 REF: 476

  1. Creating a Web application is similar to creating a(n) ____ application.
a.hostedc.inactive
b.Windowsd.data-driven

ANS: B PTS: 1 REF: 476

  1. The ____-side computer is the computer that will deliver the Web page to the user’s computer.
a.hostc.server
b.userd.client

ANS: C PTS: 1 REF: 476

  1. The ____-side computer is the computer that is requesting the Web page.
a.hostc.server
b.userd.client

ANS: D PTS: 1 REF: 476

  1. The ASP.NET 4.0 technology used with Visual Basic 2010 creates a(n) ____.
a.active server pagec.interactive server party
b.concatenated server postd.interactive search post

ANS: A PTS: 1 REF: 476

  1. The ____ file is a master page file that provides an overall layout for the site with headers, buttons, and footers.
a.Page.templatec.Default.htm
b.Index.templated.Site.master

ANS: D PTS: 1 REF: 479

  1. A ____ page is designed to create a consistent layout for the pages in your application.
a.keyc.master
b.defaultd.super

ANS: C PTS: 1 REF: 479

  1. If you change the color or title of a ____ page, all the pages in the site will reflect that same color and title.
a.masterc.key
b.defaultd.super

ANS: A PTS: 1 REF: 479

  1. If you prefer to design a Web page without using starter templates, select ____ before you name the project when you create a new Web Site project.
a.No templatec.Without Master Page
b.ASP.NET Empty Web Sited.all of the above

ANS: B PTS: 1 REF: 480

  1. A graphic image can be shown on a ASP.NET 4.0 Web form by using a(n) ____ object.
a.Imagec.Graphic
b.PictureBoxd.Visual

ANS: A PTS: 1 REF: 484

  1. The ____ property of a Button object contains the name of the button.
a.IDc.Name
b.ButtonTitled.ButtonCaption

ANS: A PTS: 1 REF: 491

  1. The name of a CheckBox object is stored in its ____ property.
a.IDc.Name
b.BoxTitled.BoxCaption

ANS: A PTS: 1 REF: 493

  1. The ____ property of a CheckBox indicates whether a CheckBox has been checked.
a.Selectedc.Chosen
b.Thisd.Checked

ANS: D PTS: 1 REF: 493

  1. Using a set of RadioButton controls is preferred to using a set of ____ controls when only one choice should be made from a set of options.
a.TextAreac.ChoiceBox
b.TextLinkd.CheckBox

ANS: D PTS: 1 REF: 493

  1. The prefix ____ is used when naming a CheckBox object.
a.ckbc.cbx
b.ckcd.chk

ANS: D PTS: 1 REF: 493

  1. The ____ object displays the days in each month as appropriate for the year.
a.Plannerc.DayRunner
b.Calendard.Month

ANS: B PTS: 1 REF: 500

  1. The ____ property of the Calendar object references the date the user clicked in the Calendar object.
a.DateClickedc.SelectedDate
b.ThisDated.DateSelected

ANS: C PTS: 1 REF: 504

  1. Use the ____ property of the Calendar object to reference the current date.
a.Todayc.TodaysDate
b.Currentd.ThisDate

ANS: C PTS: 1 REF: 504

  1. The ____ object verifies that the object on a Web form contains data.
a.EmptyObjectc.RequiredFieldValidator
b.ObjectNulld.ObjectRequired

ANS: C PTS: 1 REF: 504

  1. The ____ property of a RequiredFieldValidator object contains the message that the user will see if invalid data has been entered on a Web form.
a.InvalidInfoc.ErrorMessage
b.ValidMessaged.ErrorInformationDisplay

ANS: C PTS: 1 REF: 505

  1. The prefix ____ is used when naming a RequiredFieldValidator object on a Web form.
a.rfvc.rfl
b.fldd.flv

ANS: A PTS: 1 REF: 505

  1. The ____ object should be used to ensure that the user enters data in a field.
a.RequiredFieldValidatorc.RangeValidator
b.RegularExpressionValidatord.CompareValidator

ANS: A PTS: 1 REF: 505

  1. The ____ property contains the name of the object to be validated when using the RangeValidator control.
a.ControlToValidatec.Type
b.MinimumValued.ControlToCompare

ANS: A PTS: 1 REF: 508

  1. The ____ validation control can be used to ensure that the user enters a value between 1 and 100, for example.
a.RequiredFieldValidatorc.RangeValidator
b.RegularExpressionValidatord.CompareValidator

ANS: C PTS: 1 REF: 508

  1. The ____ property of a RangeValidator control on a Web form contains the smallest acceptable value of the range.
a.LowerLimitc.RangeVal
b.MinimumValued.MinimumRange

ANS: B PTS: 1 REF: 508

  1. Use the ____ property of a validation control on a Web form to explain to the user what value is requested.
a.InvalidDataMessagec.ErrorType
b.InvalidMessaged.ErrorMessage

ANS: D PTS: 1 REF: 508

  1. The ____ property of a RangeValidator control on a Web form matches the data type of the value.
a.ControlToValidatec.Type
b.DataValued.DataType

ANS: C PTS: 1 REF: 508

  1. As shown in the accompanying figure, the ____ validation control can be used to ensure two passwords match.
a.RequiredFieldValidatorc.RangeValidator
b.RegularExpressionValidatord.CompareValidator

ANS: D PTS: 1 REF: 509

  1. The prefix ____ is used when naming a CompareValidator object on a Web form.
a.cpvc.cmv
b.cmpd.cvo

ANS: C PTS: 1 REF: 509

  1. The ____ control should be used to validate that a phone number was entered using the correct format.
a.RequiredFieldValidatorc.RangeValidator
b.RegularExpressonValidatord.CompareValidator

ANS: B PTS: 1 REF: 510

  1. The prefix ____ is used when naming a RegularExpressionValidator object on a Web form.
a.regc.rgv
b.revd.rvl

ANS: B PTS: 1 REF: 510

  1. The prefix ____ is used when naming a ValidationSummary object on a Web form.
a.vsoc.vls
b.vstd.vsm

ANS: D PTS: 1 REF: 514

  1. The ____ property of the String class determines the number of characters in the string.
a.CharNumc.Length
b.Numd.CharLength

ANS: C PTS: 1 REF: 515

  1. The ____ procedure of the String class is used to remove spaces from the string.
a.TrimSpacesc.Trim
b.TrimEndsd.TrimEndSpaces

ANS: C PTS: 1 REF: 516

  1. The ____ procedure converts a string value to uppercase letters.
a.ToUpperc.ConvertToUpper
b.ToUpperCased.UpperCaseConvert

ANS: A PTS: 1 REF: 517

  1. The ____ procedure converts a string to lowercase letters.
a.ConvertToLowerc.ToLower
b.LowerCaseConvertd.ToLowerCase

ANS: C PTS: 1 REF: 517

  1. The ____ method saves coding time because it prevents all the possible ways of entering a response from having to be compared.
a.ConvertAll()c.ToUpper()
b.Verify()d.Screen()

ANS: C PTS: 1 REF: 517

MODIFIED TRUE/FALSE

  1. A Web page that allows users to enter information on a Web form is considered a static Web page. _________________________

ANS: F, dynamic

PTS: 1 REF: 476

  1. A Web page that has no user interaction is a standard Web page. _________________________

ANS: F, static

PTS: 1 REF: 476

  1. If you prefer to design a Web page without using the starter templates, select ASP.NET Web Site before you name the project when you create a new Web Site project. _________________________

ANS: F, ASP.NET Empty Web Site

PTS: 1 REF: 480

  1. Web pages are often interactive. _________________________

ANS: T PTS: 1 REF: 489

  1. The difference between CheckBox objects and RadioButton objects is that the RadioButton object allows the user to select more than one option. _________________________

ANS: F, CheckBox

PTS: 1 REF: 493

MULTIPLE RESPONSE

Modified Multiple Choice

  1. By default, the Calendar object on a Web form ____.
a.automatically displays the current month according to the system date
b.automatically displays the current week according to the system date
c.selects the current day when the application is executed
d.selects the current week when the application is executed

ANS: A, C PTS: 1 REF: 500

  1. When using a Calendar object on a Web form, you can reference ____.
a.the current timec.the date selected by the user
b.the current dated.the calendar extension

ANS: B, C PTS: 1 REF: 500

  1. The RangeValidator object on a Web form has a Type property for identifying the type of data for the range, such as ____.
a.Booleanc.Integer
b.Textd.String

ANS: C, D PTS: 1 REF: 508

  1. The ValidationSummary control ____.
a.overrides the display of individual error messages by other validators
b.uses the prefix rfv
c.can list all error messages in a blank area at the top or bottom of a form
d.displays all of the messages in one place

ANS: C, D PTS: 1 REF: 514

  1. The <br> tag ____.
a.must be in double quotation marks when it appears in a string
b.is never a string
c.starts a new line of text
d.places a new line of text above and below the line on which it appears

ANS: A, C PTS: 1 REF: 515

TRUE/FALSE

  1. To test an ASP.NET 4.0 Web application, you need Internet Information Server (IIS) or FrontPage Server Extensions installed on the computer.

ANS: F PTS: 1 REF: 474

  1. A Web form can be displayed in a standard Windows Explorer window or in a browser window.

ANS: F PTS: 1 REF: 474

  1. When your Web page is ready for the world to see, you must place it on an actual Web server.

ANS: T PTS: 1 REF: 476

  1. When you develop an ASP page in Visual Basic, the work you do on the design page to create the user interface will generate the HTML code for the active server page.

ANS: T PTS: 1 REF: 476

  1. The HTML code for an active server page includes the HTML to format and display the page, and might include JavaScript code to perform certain processing, such as ensuring that a text box contains data.

ANS: T PTS: 1 REF: 476

  1. When an active server page is requested, both the ASP.NET 4.0 code for the server and the HTML code for the client are sent to the client.

ANS: F PTS: 1 REF: 476

  1. The event handler code that you write in Visual Basic for an event is executed on the client-side computer.

ANS: F PTS: 1 REF: 476

  1. You need Expression Web to work with its Web pages in Visual Basic 2010.

ANS: F PTS: 1 REF: 477

  1. Web application filenames in Visual Basic 2010 can include blank spaces.

ANS: F PTS: 1 REF: 479

  1. The master page specifies the layout, color, and text that are repeated on the actual Web pages that are displayed by the browser.

ANS: T PTS: 1 REF: 480

  1. A master page is basically defined as a nondisplaying page.

ANS: T PTS: 1 REF: 480

  1. A master page contains the information about the layout of a page, which will be used in the creation of body pages.

ANS: T PTS: 1 REF: 480

  1. A master page enables the users to create the layouts of the pages quickly and conveniently across the entire Web site.

ANS: T PTS: 1 REF: 480

  1. You place objects on a Web form using a Toolbox similar to the one used for Windows applications, though its categories of tools are different.

ANS: T PTS: 1 REF: 483

  1. Toolbox objects unique to Web application objects include Navigation objects for allowing user access.

ANS: F PTS: 1 REF: 484

  1. An Image object on a Web form differs from a PictureBox object in where the Image object is stored.

ANS: T PTS: 1 REF: 484

  1. A table is often used to organize Web site content into columns.

ANS: T PTS: 1 REF: 490

  1. The Text property of a TextBox object cannot be blank in a Web form.

ANS: F PTS: 1 REF: 491

  1. A DropDownList object on a Web form will not display the list items until a user clicks on the list arrow button.

ANS: T PTS: 1 REF: 496

  1. When using the RangeValidator control, if the Type property is not specified, it will be selected automatically to produce the best result.

ANS: F PTS: 1 REF: 508

  1. The CompareValidator object on a Web form can be used only to compare the value of one object to the value of another object.

ANS: F PTS: 1 REF: 509

  1. The RegularExpressionValidator is used to check if data entered by the user is within a specified numeric range.

ANS: F PTS: 1 REF: 510

  1. Each validation control displays an error message if the object does not meet the specified criteria

ANS: T PTS: 1 REF: 513

  1. By default, each validation control displays an error message next to the object it validates.

ANS: T PTS: 1 REF: 514

  1. Visual Basic will automatically trim off extra spaces from the beginning and end of a string.

ANS: F PTS: 1 REF: 516

COMPLETION

  1. A Web page that allows users to enter information on a Web form is considered to be a(n) ____________________ Web page.

ANS: dynamic

PTS: 1 REF: 476

  1. The ASP.NET 4.0 technology used with Visual Basic 2010 creates a(n) ____________________.

ANS:

ASP

active server page

active server page (ASP)

ASP (active server page)

PTS: 1 REF: 476

  1. To reopen a saved Visual Basic Web application, open Visual Studio, click ____________________ on the File menu, and browse to the main project folder to open the Web site.

ANS: Open Web Site

PTS: 1 REF: 477

  1. Visual Basic 2010 provides a starter ____________________ to assist you in designing a Web page.

ANS: template

PTS: 1 REF: 479

  1. You can change the color of a page by selecting the background color and foreground color tools on the ____________________ toolbar.

ANS: Formatting

PTS: 1 REF: 481

  1. By default, the ____________________ site has two buttons, Home and About.

ANS: Master

PTS: 1 REF: 482

  1. As shown in the accompanying figure, you can use a(n) ____________________ object to display a picture in an ASP.NET 4.0 Web page.

ANS: Image

PTS: 1 REF: 485

  1. The ____________________ object is used to accept text entered by the user on a Web form.

ANS: TextBox

PTS: 1 REF: 491

  1. A(n) ____________________ object should be used when several independent options are presented and the user is allowed to select more than one option.

ANS: CheckBox

PTS: 1 REF: 493

  1. The ____________________ object is used when only one of a group of related options can be selected.

ANS: RadioButton

PTS: 1 REF: 493

  1. To allow a user to make a selection from a predefined list on a Web form, use a(n) ____________________ object.

ANS: DropDownList

PTS: 1 REF: 496

  1. To test whether an input value falls within a given range, use a(n) ____________________ control.

ANS: RangeValidator

PTS: 1 REF: 508

  1. The ____________________ property of a RangeValidator control contains the name of the object you are validating.

ANS: ControlToValidate

PTS: 1 REF: 508

  1. The ____________________ object of a Web form is used to compare one object’s value with the value of another object or with a constant value.

ANS: CompareValidator

PTS: 1 REF: 509

  1. The ____________________ property of a CompareValidator control on a Web form specifies the name of the object you are comparing to the control that is being validated.

ANS: ControlToCompare

PTS: 1 REF: 509

  1. To validate that data entered in a Web form is in a specified format, use a(n) ____________________ control.

ANS: RegularExpressionValidator

PTS: 1 REF: 510

  1. The ____________________ property of the RegularExpressionValidator object specifies the format of the data the control is expecting.

ANS: ValidationExpression

PTS: 1 REF: 510

  1. The ____________________ control of a Web form is used to list all validation errors in a single place on the form.

ANS: ValidationSummary

PTS: 1 REF: 514

  1. The ____________________ method is used to remove spaces from the beginning and end of a string.

ANS: Trim

PTS: 1 REF: 516

  1. You can use the ____________________ procedure of the String class to convert a string to all lowercase characters.

ANS: ToLower

PTS: 1 REF: 517

MATCHING

Identify the letter of the choice that best matches the phrase or definition.

a.RangeValidatorf.ErrorMessage
b.CompareValidatorg.Checked
c.Texth.TextBox
d.ControlToValidatei.Web server
e.RequiredFieldValidatorj.dynamic

  1. Creating this kind of Web site is similar to creating an interactive Windows application

  1. When an event is triggered in an ASP.NET 4.0 page, the event handler code is executed here

  1. Object used to compare an object’s value to a constant value, for example

  1. Kind of Web form objects used primarily for data entry by the user

  1. TextBox property object that is blank by default when the object is created on a Web form

  1. CheckBox object property that makes a checkbox checked by default when set to true

  1. When using this object on a Web form, you must specify the control to be validated

  1. Uses five properties to complete its validation

  1. Each validation control contains this property, which indicates which control it should check for its criteria

  1. CompareValidator property that contains a message stating that the value does not match

  1. ANS: J PTS: 1 REF: 476

  1. ANS: I PTS: 1 REF: 476

  1. ANS: B PTS: 1 REF: 509

  1. ANS: H PTS: 1 REF: 491

  1. ANS: C PTS: 1 REF: 491

  1. ANS: G PTS: 1 REF: 493

  1. ANS: E PTS: 1 REF: 505

  1. ANS: A PTS: 1 REF: 508

  1. ANS: D PTS: 1 REF: 508-510

  1. ANS: F PTS: 1 REF: 509

ESSAY

  1. Explain in detail how to use a multi-page starter template in Visual Basic 2010. What are its advantages?

ANS:

Visual Basic 2010 provides a starter template to assist you in designing a Web page. The starter template allows you to create a new ASP.NET application with some layout and structure already implemented within it. The Site.master file is a master page file that provides an overall layout for the site with headers, buttons, and footers. A master page is designed to create a consistent layout for the pages in your application. It defines the look and feel and standard behavior that you want for all of the pages in your Web site. If you change the color or title of the master page, all the pages in the site will reflect that same color and title. First design the master page and then customize the actual pages on the Web site. The master page specifies the layout, color, and text that are repeated on the actual Web pages that are displayed by the browser. A master page is basically defined as a nondisplaying page. It contains the information about the layout of the page, which will be used in the creation of body pages. It enables the users to create the layouts of the pages quickly and conveniently across the entire Web site.

PTS: 1 REF: 479 TOP: Critical Thinking

  1. Explain how to add TextBox and Button objects to a Web form. Compare and contrast this process to the process for their Windows counterparts.

ANS:

Like other Web form objects, TextBox and Button objects are similar to their Windows counterparts apart from a few exceptions. A TextBox object on a Web page usually is provided for data entry, allowing a user to enter a name, address, e-mail address, or zip code, for example. The Text property of a TextBox object, therefore, is blank. A Button object on a Web form serves the same purpose as it does in Windows applications. Because the user generally clicks the Button object after completing the Web form, the Text property for a Button object on a Web form often is Submit. To name the TextBox and Button objects, you use the (ID) property.

PTS: 1 REF: 491 TOP: Critical Thinking

  1. Explain what a DropDownList object is and how you specify items you want to display in the list.

ANS:

The DropDownList object allows users to select one item from a predefined list. It is similar to the ListBox object used in Windows applications, except that for a DropDownList object, the list of items remains hidden until users click the list arrow button. After adding a DropDownList object to a form and naming it, you can specify the items you want to display in the list. You often want to order these items alphabetically or numerically for ease of use. The first item in this list appears in the DropDownList object by default. The DropDownList object will not display the items in the list until you run the application and display the Web form in a browser. The user must click the list arrow to view the complete list of items during execution. The prefix for the name (ID) of the DropDownList object in Visual Basic is ddl.

PTS: 1 REF: 496 TOP: Critical Thinking

CASE

Critical Thinking Questions

Case 7-1

You have been doing a lot of Web surfing lately as part of your research for your course and along the way you have noticed a growing number of active server pages. You have a good head for technical details and ask your friend Laura to enlighten you about some of the finer points of ASP technology.

  1. Which of the following does Laura tell you is NOT a component of the active server page?
a. the generated code component that executes on the Web serverc. the database engine that generates the form
b. the HTML component that is interpreted and executed by a Web browserd. All of the above are components of the active server page.

ANS:

C

PTS: 1 REF: 476 TOP: Critical Thinking

  1. You know that Laura has developed some active server page solutions in the past. Which of the following is NOT a true statement that she can make to you as a result of her experience?

a. When you develop an ASP page in Visual Basic, the work you do on the HTML code for the active server page will generate the design page from which the user interface is created.c. An active server page contains the server-side code that will operate on data entered by the user.
b. An active server page contains the HTML code that will display the page in a Web browser on the client-side computer.d. When the page is requested by a browser, ASP sends the HTML code to the client requesting the Web page.

ANS:

A

PTS: 1 REF: 476 TOP: Critical Thinking

Critical Thinking Questions

Case 7-2

Rafael has been staring at his tourism project for a long time. He is pleased with what he has produced but something — he is not quite sure what — is still missing. Then in a flash, it occurs to him: he needs to add an image of a group of vacationers having fun to the page.

  1. If Rafael is creating a Windows application, what kind of object will he use to display the picture of the vacationers?

a. Visualc. PictureBox
b. Graphicd. Image

ANS:

C

PTS: 1 REF: 484 TOP: Critical Thinking

  1. If Rafael is creating a Web page in ASP.NET 4.0, what kind of object will he use to display the picture of the vacationers?

a. Visualc. PictureBox
b. Graphicd. Image

ANS:

D

PTS: 1 REF: 484 TOP: Critical Thinking

+
-
Only 0 units of this product remain

You might also be interested in