Quiz
Using Objects
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (10)
1Which one of the following is true?
A private variable declared within a class is:- Aencapsulated in the class
- Ba value type variable
- Can object variable
- Dastracted from the class
2Look at the following VB program code:
Public Class Person
Private mFirstName As String
Private mSurname As String
Public Function GetFullName() As String
Dim retVal As String = String.Empty
If Not String.IsNullOrEmpty(mFirstName) Then
retVal = mFirstName & " "
End If
retVal &= mSurname
Return retVal
End Function
End Class
Which one of the following statements about mFirstName is NOT correct?- AmFirstName has global scope
- BmFirstName is an instance variable
- CmFirstName has module scope
- DmFirstName is a class-level variable
3Which one of the following errors occurs when an instance variable is declared but its initialization with the 'New' keyword is omitted?
- ASystem.NotImplementedException
- BSystem.NullReferenceException
- CSystem.ApplicationException
- DSystem.ArgumentNullException
4An error occurs when an instance variable is declared but is not initialized using the 'New' keyword. What sort of error occurs?
- AA design-time error occurs
- BA compilation error occurs
- CA build error occurs
- DA run-time error occurs
5Which one of the following is not a member of a class?
- AMethods
- BNamespaces
- CProperties
- DProcedures
6Is the following statement true or false?
Namespaces must be imported before the classes they contain can be used.- ATrue
- BFalse
7Which one of the following statements is true?
- AClasses in the .Net Framework are divided into libraries.
- BClasses in the .Net Framework are divided into namespaces.
- CObjects in the .Net Framework are divided into classes.
- DObjects in the .Net Framework are divided into collections.
8Where are controls that do not have a visual representation on a Form displayed in the IDE?
- AThe Component Tray
- BThe System Tray
- CThe Toolbox
- DThe Component Toolbar
9Which one of the following is the Timer control property used to specify the time between ticks in milliseconds?
- AEnabled
- BRate
- CDelay
- DInterval
10Which one of the following is the name given to a constructor method?
- AInitializeComponent
- BCreate
- CInvoke
- DNew
Information
- Description
- Quiz on Using Objects, created by Harkaran Matharu on 21/05/2018.
- Author
- Harkaran Matharu
- Language
- English
- Views
- 0
- Rating
- No ratings yet Rate this quiz