Study Guides (390,000)
US (220,000)
LSU (10,000)
ISDS (100)
All (3)

ISDS 3200 Exam 1 Study GuideExam


Department
Information Systems & Decision Sciences
Course Code
ISDS 3200
Professor
All

This preview shows page 1. to view the full 5 pages of the document.
Garrett Ellison
ISDS 3200 Written Test 1 Study Guide
Chapter 1
T/F
1.) Strings are value types.
a. FALSE
2.) Private methods may be referenced only by other methods in the same class
a. TRUE
3.) If a class named Account has a single constructor containing two required parameters, the
following line will compile: Dim act As new Account()
a. FALSE
4.) A shared class-level variable must always be marked Private.
a. FALSE
5.) If the Employee class had a public property named IDSize, you would have to write an
expression such as Employee.IDSize to access the property.
a. FALSE
6.) The controls in the Visual Studio toolbox represent classes.
a. TRUE
7.) When you drag a control onto a form, you are creating a class.
a. FALSE
8.) Integer is not a value type.
a. FALSE
9.) Instances of classes are reference types.
a. TRUE
10.) When you initialize a reference variable, use the New operator.
a. TRUE
11.) When the assignment operator (=) assigns one reference variable to another, the variables point
to two different points.
a. FALSE
Short Answer
1.) Suppose isFullTime is a Boolean variable. Is the following the best way to use it in an
expression? If isFullTime = True Then ...
a. No. You can use If isFullTime Then
2.) Which tier in a two-tier application is responsible for interacting with the user?
a. Presentation tier
3.) How are class behaviors implemented in Visual Basic?
a. As class methods
You're Reading a Preview

Unlock to view full version

Only page 1 are available for preview. Some parts have been intentionally blurred.

4.) In a two tier Student Registration application, which tier would contain rules that decide if a
student’s grade average is high enough to enroll in classes during the current term?
a. Middle (business logic) tier
5.) How is a shared class variable different from a non-shared class-level variable?
a. At runtime, when multiple instances of the class exist, no more than a single copy of a
shared variable exists. In contrast, each instance of the class will contain its own copy of
a non-shared variable.
6.) Write code that creates a shared property named Color for a class named Window.
a. Class Window
Public Shared Property Color as String
7.) Show an example of declaring a method named MyMethod with a single reference parameter of
type string. The method should not return a value.
a. Sub MyMethod(ByRef str As String)
8.) What is the name of the principle that advocates keeping class-level variables private?
a. Information hiding (encapsulation)
9.) If a class-level variable is declared private, how can users of the class get and set the variable’s
value?
a. Create public properties that get and set the variable’s value
10.) Create a constructor for a class named Hero that receives two Integer parameters: pStrength
and pIntelligence. Make the parameters optional. The corresponding class properties are
named Strength and Intelligence.
a. Class Hero
Public Sub New(Optional ByVal pStrength As Integer = 0,
Optional ByVal pIntelligence As Integer = 0)
Strength = pStrength
Intelligence = pIntelligence
End Sub
11.) Which section (Set or Get) is omitted from a ReadOnly property?
a. The Set section is omitted
Chapter 2
T/F
1.) If an exception is thrown through a Try block, the appropriate Catch block executes
immediately.
a. True
2.) The IsDigit method is a shared method in the Char class.
a. True
3.) After a Catch block executes, any remaining statements in the Try block are executed.
a. False
4.) The Finally block always executes, whether or not an exception was thrown.
a. True
You're Reading a Preview

Unlock to view full version