Documente Academic
Documente Profesional
Documente Cultură
True or False? Circle the letter corresponding to your choice. (20 points)
T F 7. Decimal, Integer and Single are all names of .NET numeric data types.
T F 8. Visual Basic allows you to use either the '+' character or the '&' character to
represent the concatenation operation for Strings.
T F 10. A Button, TextBox or other VB control has a Visible property whose value can be
either True or False.
T F 15. The first element of a Visual Basic array has zero as its index value,
T F 16. Adding too many comments in a program can make it run slower.
T F 17. Visual Basic has a number of different loop structures, including For...Next,
Do While ... Loop, Do Until ... Loop and For Each ... Next.
2. To make one project in a VB solution aware of definitions in another project, you need to
define a reference in the VB project that needs to use those remote definitions.
3. In order to run VB programs on your computer, you don't need to install Visual Studio or
the entire VB development environment, but you would need to install the CLR or common language runtime.
5.An apostrophe in a line of a Visual Basic program marks the beginning of a comment.
8. You can display information on a form by assigning a value to a Label's text property.
11. If you attempt to compute too large a value in an Integer variable, integer overflow can occur.
12. VB Structures differ from VB Classes because a Structure is a value type whereas a
Class is a reference type.
13. If you want a subroutine to make some changes to one of the parameters it is passed, that
parameter should be passed by reference (or ByRef) .
14. The ReDim statement in VB can be used to change the size of an array and reallocate
the right amount of memory space to satisfy the new space requirement.
15. The If ... Then statement can execute one group of statements if a condition is true and a
different group of statements if that condition is false.
16. Variables in a VB class which are not Shared are called instance variables .
18. If the condition c1 And c2 is True, then c1 must be True and c2 must be True .
19. The value of the VB expression 100 MOD 12 is 4 (the remainder when 100 is divided by 12) .
1. A Visual Basic project could be a Windows Application? In which situations is this the best
choice for the project type?
The development of a Windows application requires one to invest time and effort in creating
and testing a Windows form. This is most appropriate for the creation of an application
program that requires a lot of interaction with a human user and/or an “event driven”
application which allows a user to enter data in a number of possible orders.
2. A Visual Basic project could be a Console Application? In which situations is this the best
choice for the project type?
An application that doesn't run interactively is an excellent candidate for a console application.
In many cases, testing of subroutines and functions is conveniently done with a console
application because input data and execution patterns are planned in advance and can be readily
carried out by a “main routine”.
3. A Visual Basic project could be a Class Library? In which situations is this the best choice for
the project type?
A Class Library is a depository for useful functions and subroutines. If a project results in the
development of some such useful tools, they can be stored in a Class Library where they can
then be easily made available to other projects that need to use those functions or subroutines.
4. When testing code, you can't typically identify all of the tests your code needs to pass. What
principles should guide you in developing a test plan and testing scenarios so that high-quality
testing can be achieved?
Ideally, a plan for testing a software project should start falling into place before the actual
development of that software begins. Before coding begins, one should attempt to think of all
the tests the code is expected to pass. Then a representative subset of these tests can be selected
for actual testing purposes.