Visual Basic 2 Test 1 Chapter 1 & 2

Ace your homework & exams now with Quizwiz!

9. What must programs that are run in the CLR be

CLS-compliant

18. Where are Graphics that are added to a project stored

In the Resource folder

42. You can make any form into a parent form by setting which property to True

IsMdiContainer property to True

8. Can a reference type hold a value

It may or may not hold a value

8. What object-oriented programming characteristic allows a single class to have more than one method with the same name but a different argument list

Polymorphism

29. Instead of using Parse to convert a string to a number, what method can you use to convert the numeric value to 0 if the conversion fails

TryParse

30. Which text box event is appropriate for performing field-level validation of numeric data

Validating event

15. What file supplies the graphics to the form at compile time

.resx file

17. The following are true about property procedures: property procedures in a class:

1.) Allow the values of the properties to be accessed 2) May contain a Get 3.) May contain a Set

46. What is the Singleton Pattern

A technique to prevent multiple instances of a class

1. What is the creation of a model of an object, for the purpose of determining the characteristics (properties) and behaviors (methods) of the object

Abstraction

3. What do you use when planning the classes and the necessary properties and methods for an object-oriented program

Abstraction

32. What component can your program uses to display an error message to the user instead of using the message box

An ErrorProvider

6. What is the common language runtime (CLR)

An environment that manages execution of code

11. When a single class has more than one method with the same name, but a different argument list, this is called what type of method

An overloaded method

24. What does a parameterized constructor require

Arguments

26. What objects contain information about parts of a program, such as the company, copyright, language, and product

Assembly Attributes

29. What is the name of the file where you make changes to the tags that contain information about parts of a program (name, version, etc.)

AssemblyInfo.vb

27. What are the assembly attributes that can be retrieved using the My.Application.Info object

AssemblyName, CompanyName, Description, DirectoryPath, Copyright, Trademark, Name, ProductName, Title, and Version

31. When does the Validating event of a text box occur

Before the LostFocus event

34. How can a context menu item share the code in the Click event of a menu item

By adding the context menu item to the Handles clause of the menu's event handler

28. How can you modify these attributes

By editing the AssemblyInfo.vb file

2. What provides services for tasks such as integrating components developed in different languages, handling errors across languages, security, and managing the storage and destruction of objects

CLR

44. What are the options for arranging open child windows

Cascade, TileVertical, TileHorizontal

36. What property does each for and each control have that allows you to assign a context menu to that object

ContextMenuStrip p. 23

43. How do you customize an existing class

Create a new class that inherits from the base class and then add properties and methods to include new capabilities

2. What is sometimes referred to as data hiding

Encapsulation

44. What statement would you use to create your own enumeration

Enum

47. Destroying unused objects and reclaiming memory is called what

Garbage collection

15. What is the advantage of using multi-tiers in a programming application

It allows the program to be more flexible when it is run on different machines

20. What is stored in the .resx project file

It holds pointers to the files in your Resources folder and supplies the resources to the form at compile time. Resources include any graphics elements added to the form such as pictures and icons

28. What happens when you use TryParse instead of Parse and an exception occurs when the parse fails

It returns a o instead of throwing an exception

10. What is a platform-independent set of instructions that is combined with the metadata to form the portable executable (PE) file, which has an .exe or .dll extension

MSIL

11. When your Visual Basic .NET source code is compiled, your code is translated into a platform-independent set of instructions called what

MSIL, Microsoft Intermediate Language

36. Any variable declared inside of a class but outside of a procedure will be what scope

Module-level

38. Any variable declared inside a class, but outside of a procedure or function has which type of scope

Module-level scope.

40. What is MDI an acronym for

Multiple Document Interface

25. What is a new feature of VB.NET 2008 that can be used to provide easy access to information about the computer on which the application is executing

My

42. When you make a new class inherit from an existing class, usually the first statement in the constructor is what

MyBase.New()

23. Do you need to write a destructor for your class

No

18. Is it recommended that you create only Public variables when you create your own class so that all other classes can set and retrieve the values of the variables

No , it is recommended that you use Private for you class variables and Public for your methods.

23. Can the Visual Studio .NET IDE development environment run on machines using Windows 98 or Windows ME

No VB .On machines using Windows 2000, Windows NT , Windows XP, or Vista operating system? Yes Will .NET applications run in Windows 98 or Windows ME even though they cannot be developed there? Yes Will .NET applications run in Windows 2000, Windows NT, Windows XP, & Vista? Yes

35. Are ToolStrips and MenuStrips the same thing

No but they are closely related. The MenuStrip class inherits from the ToolStrip class

33. By default each VB project has a namespace called what

One that matches the project name.

22. What is it called when a constructor has two methods in the class that have the same name but a different list of arguments

Overloading

13. What are the three-tiers in the three tier model used for application design

Presentation tier, Data tier, Business tier

14. To accomplish encapsulation, you will declare all variables in a class as what

Private

34. If you leave off the accessibility modifier (Private, Public, etc.) of a variable declared inside of a class but outside of all subprocedures or functions, what will the variable be by default

Private

13. What is stored in the AssemblyInfo.vb file

Project attributes such as name, version, culture and security

40. Which keyword defines a variable or class that is accessible from anywhere inside this class or any class that inherits from this class

Protected

19. Each form in your project has a resource file and it is saved on disk with the same name as the form file. What is the file extension for a resource file

Resx

7. What is the real purpose of inheritance

Reusability

45. If you want your Window menu item to display a list of open documents (child windows), what must you do

Select the MenuStrip component and assign its MdiWindowListItem property to the Window menu item

26. Microsoft recommends that you use which class when you write code to catch errors in your programs

System.ApplicationException

5. What are the two major parts of .NET

The .NET Framework and the Integrated Development Environment (IDE)

22. In order to run a VB.NET Application on another computer, what must be installed on that computer

The .NET Framework or the ,NET Framework Redistributable

17. When you are distributing your application, what file(s) do you need to be concerned with

The .exe file but not the .pdb file

21. To create a read-only property in a class module, use the ReadOnly modifier and write which portion of the property procedure

The Get procedure

30. What would you use to retrieve and display the assembly attributes

The My.Application.Info object

14. In which folder of your project are all of your compiled exe files stored when you compile and run a program using the debugger

The bin\Debug folder

45. What level does the Enum statement belong to

The namespace or class level

25. What happens when an error occurs (such as a division by 0) when a program is running

The system throws an exception

12. What does the presentation tier refer to in a multi-tier application

The user interface

41. How many parent forms and child forms will an MDI application have

They will always have at least parent form and 1 child form but can have multiple child and multiple parent forms

46. What happens to objects and variables that no longer have any active reference in a program

They will be destroyed by VB.NET's garbage collector

16. What is the Set procedure in a class module used for

To change the value of the property

33. What can context menus be added to

To the form or to any control on the form

31. Which component displays an image in a button that provides a shortcut for menu items

ToolStrip

7. Classes, structures, enumerations, delegates, interfaces, and data types in the library, as well as any data types that you define are referred to as what

Types

21. What operating systems is the .NET Framework Redistributable file (a free download on Microsoft's Web site) available for

Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP, Vista

43. How do you create a child form in code

Write the code to set the MdiParent property of the child form to the parent form in the code of the parent form

10. When you create your own class module, can it be used in multiple projects

Yes

38. Can StatusStips contain more than one StatusLabel

Yes

39. Can you display the date and time in a StatusLabel

Yes

4. Can you modify class properties and methods when you create a new class from an existing class

Yes

41. Can you create a new class from an existing class

Yes

6. Does a method in a derived class override a method in the base class with the same name

Yes

20. What is a constructor

a method that will automatically execute when an object is instantiated.

12. What is the smallest deployable piece of code called

an assembly

4. What does the term, "managed code" refer to

any code that is compiled to run in the CLR

39. What is the lifetime of a namespace variable

as long as the program is running.

37. Where do Status Strips typically appear

at the bottom of a form.

3. What is "Metadata"

data that describes data.

24. After a program has been tested and it is determined that it is ready for use, what is it called when you install it on other computers

deployment P. 13

5. Creating a new class from an existing class is called what

inheritance

37. What are the different types of scopes for variables or constants in VB .NET

module-level , procedure-level, namespace

16. What file holds debugging information from your project

pdb

9. The ability to take on many shapes or forms is called what

polymorphism

27. In a multitier application, error messages for the user must come from which tier

presentation

32. What does the user need to do in order to display a context menu

right-click on an object

35. What is the scope

the area of the program that can "see" a variable or constant.

What is the .NET Framework composed of

the common language runtime (CLR), class libraries, ASP.NET

19. What is the Get procedure in a class module used for

to retrieve a value from a property.


Related study sets

Unit 4 - Weather & Climate - CONTENT Review

View Set

Chapter 24 Alterations in Genitourinary Function

View Set

The Preamble to the U.S. Constitution

View Set

Vertebral Column and Muscles of the Back

View Set

Chapter 1 - Business Analytics (BA) at a Glance

View Set