Deck 11: Classes and Objects

ملء الشاشة (f)
exit full mode
سؤال
A ____ encapsulates the attributes and behaviors of the object it creates.

A)constructor
B)property
C)class
D)structure
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which of the following instantiates a Product object and assigns it to the bookcase variable?

A)Dim bookcase As Product
B)Dim bookcase As New Product
C)Dim Product As bookcase
D)Dim bookcase As String
سؤال
A class is anything that can be seen,touched,or used; in other words,a class is nearly any thing.
سؤال
In the following instruction,Room is a(n)____. Dim bedroom As New Room

A)object
B)variable
C)class
D)property
سؤال
The Class statement ends with the keyword(s)____.

A)Class
B)Exit Class
C)End Class
D)Next Class
سؤال
A one-dimensional array's Length property is an example of a ReadOnly property.
سؤال
____ are the actions to which an object can respond.

A)Attributes
B)Events
C)Behaviors
D)Methods
سؤال
Every object has ____,which are the characteristics that describe the object.

A)events
B)methods
C)attributes
D)behaviors
سؤال
In its simplest form,the Class statement can be used in place of the Structure statement.
سؤال
Only an instance of a class-not the class itself-is an object.
سؤال
You can overload any of the methods contained in a class.
سؤال
The purpose of a(n)____ in OOP is to encapsulate the properties that describe an object,the methods that allow the object to perform tasks,and the events that allow the object to respond to actions.

A)event
B)class
C)method
D)attribute
سؤال
____ are the operations (actions)that the object is capable of performing.

A)Events
B)Attributes
C)Behaviors
D)Methods
سؤال
Private variables represent properties that will be seen by anyone using an object created from the class.
سؤال
A Public property procedure creates a property that is visible to any application that contains an instance of the class.
سؤال
When a variable in a class is declared using the Public keyword,it can be used only within the class.
سؤال
A class can have multiple default constructors.
سؤال
When naming the Private variables in a class,many programmers use the ____ as the first character and then use camel case for the remainder of the name.

A)dash
B)admiration sign
C)asterisk
D)underscore
سؤال
You create a Public property using a ____.

A)Sub procedure
B)Function procedure
C)Property procedure
D)Set block
سؤال
Constructors never return a value,so they are always Function procedures.
سؤال
Which of the following clauses allows a derived class named Truck to have the same attributes and behaviors as its base class,which is named Automobile?

A)Inherit Truck
B)Inherits Truck
C)Inherit Automobile
D)Inherits Automobile
سؤال
You can create one class from another class.In OOP,this is referred to as ____.

A)encapsulation
B)overloading
C)overriding
D)inheritance
سؤال
An application needs to calculate the sales tax for an order.Which of the following is a valid example of a variable in a class that can be validated in the Set block of a Property procedure?

A)Private TaxRate As Double
B)Private _dblTaxRate As Double
C)Public TaxRate As Double
D)Public _dblTaxRate As Double
سؤال
In a Property procedure,the dataType must match the data type of ____ associated with the Property procedure.

A)all constructors
B)all variables
C)the Public variable
D)the Private variable
سؤال
If you create an auto-implemented property named State,Visual Basic will create a hidden Private variable named ____.

A)State
B)_State
C)STATE
D)state_
سؤال
The Tree class is derived from a base class named Plant.Which of the following statements can be used by the Tree class to invoke the Plant class's default constructor?

A)MyPlant.New()
B)MyBase.New()
C)MyTree.New()
D)MyTree.Base
سؤال
____ is useful when two or more methods require different parameters to perform essentially the same task.

A)Instantiation
B)Overloading
C)Encapsulation
D)Overriding
سؤال
A(n)____ is a class method whose sole purpose is to initialize the class's Private variables.

A)signature
B)constructor
C)Get block
D)event
سؤال
Which of the following is a valid example of an object?

A)Place Order button in an application
B)credit card receipt
C)text box to enter the credit card number in an application
D)a and c
E)all of the above
سؤال
A constructor that has no parameters is called the ____.

A)Property procedure
B)default constructor
C)parameterized constructor
D)Set block
سؤال
When two or more methods have the same name but different parameters,the methods are referred to as ____.

A)default methods
B)parameterized methods
C)overloaded methods
D)Property procedures
سؤال
A method name combined with its optional parameterList is called the method's ____.

A)signature
B)event
C)attribute
D)behavior
سؤال
In a Property procedure,the code contained in the ____ block allows an application to retrieve the contents of the Private variable associated with the property.

A)Set
B)Assign
C)New
D)Get
سؤال
The first word in a method name should be a(n)____.

A)verb
B)noun
C)adjective
D)preposition
سؤال
A Property procedure begins with the keywords ____.

A)Public [ReadOnly | WriteOnly] Property
B)Private [ReadOnly | WriteOnly] Property
C)Start [ReadOnly | WriteOnly] Property
D)Dim [ReadOnly | WriteOnly] Property
سؤال
The code in the ____ allows an application to assign a value to the Private variable associated with the property.

A)Get block
B)default constructor
C)Set block
D)Property procedure
سؤال
You indicate that a class is a derived class by including the ____ clause in the derived class's Class statement.

A)Inherits
B)Base
C)Overrides
D)Overloads
سؤال
Constructors that contain parameters are called ____.

A)attributes
B)default constructors
C)Set blocks
D)parameterized constructors
سؤال
A(n)____ property gets its value from the class itself rather than from the application.

A)WriteOnly
B)ReadOnly
C)Set block
D)Get block
سؤال
The Inherits clause is the keyword ____ followed by the name of the class whose attributes and behaviors you want the derived class to inherit.

A)It Inherits
B)InheritsFrom
C)Inherits
D)Inherits_From
سؤال
Explain the difference between Public and Private variables for a class.
سؤال
Write a Class statement that defines a class named Employee.(The class contains four public variables named EmpID,LastName,FirstName,and PayRate.The EmpID,LastName,and FirstName variables are String variables.The PayRate variable is a Decimal variable.)Then write a statement that creates an Employee variable named partTime and also instantiates an Employee object,assigning it to the partTime variable.
سؤال
Write a Class statement that defines a class named Furniture.The class contains two private variables named _strItemNum and _dblPrice.Name the corresponding properties ItemNumber and Price.
سؤال
The Shoe class is used to create an object that represents a standard shoe.The Shoe class needs to be used in an application for boots.You have copied the Shoe.vb file into the boot application.What do you need to do next to include the file in the boot application?

A)Click PROJECT on the menu bar and then click Add Existing Item.
B)Select the Shoe.vb file from the list of filenames.
C)Click PROJECT on the menu bar and then click Add Class.
D)Click the Add button to add the file.
سؤال
Public Class Truck
Private Property Miles As Decimal
Public Function New()
_Miles = 0
End Function
Public Sub New(ByVal decM As Decimal)
Miles = decM
End Sub
Public Overrider Function GetMPG()As Decimal
'returns the miles per gallon for a truck
Return _Miles / 30
End Function
End Class
'derived class
Public Class Car
Receives Truck
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal decM As Decimal)
MyBase.New(decM)
End Sub
Public Function GetMPG()As Decimal
Return _Miles / 18
End Function
End Class
سؤال
The Discount class is used by applications for assigning appropriate discounts to orders.A Public property within the class is made ReadOnly.Which of the following is true about this ReadOnly property?

A)The Set block of code will be entered in the class.
B)The applications using the Discount class will determine the appropriate discount.
C)The application will only be able to retrieve the discount.
D)The application will be able to change the discount.
سؤال
A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.Write the method's procedure header in the base class that will allow the derived class to override the function.
سؤال
What are classes and objects? How are they used in object-oriented programming?
سؤال
Public Class Employee
Private _strEmpId As String
Public _decSalary As Decimal
Public Property EmpId As String
Set(ByVal value As String)
_strEmpId = value
End Set
End Property
Public Property Salary As Decimal
Get
Return _decSalary
End Get
Set(ByVal value As Decimal)
Salary = value
End Set
End Property
Public Function New()
_strEmpId = String.Empty
_decSalary = 0
End Sub
End Class
سؤال
Rather than reuse the Shoe class,you have decided to derive the Boot class from the Shoe class.Which of the following creates the derived Boot class?

A)Private Class Shoe Inherits Boot
B)Private Class Boot Inherits Shoe
C)Public Class Shoe Inherits Boot
D)Public Class Boot Inherits Shoe
سؤال
An application has a Private variable named _decGPA.Write the statements for the Property procedure named GPA to validate the value received from the application before assigning it to the Private variable.
سؤال
Every object has attributes and behaviors.Describe each of these,including the two types of behaviors an object can have.
سؤال
What is an auto-implemented property and what does it automatically create?
سؤال
Write the code for an auto-implemented property named TaxableIncome.The property's data type is Decimal.Then list the two hidden items it creates.
سؤال
Define the term "inheritance" in object-oriented programming and describe its use.
سؤال
Write the statements to create the default constructor for the Furniture class statement in the previous problem.Then write the Dim statement to use the default constructor to instantiate a Furniture object,assigning the object to a variable named sofa.
سؤال
The Lumber class definition contains two Private variables named _dblLength and _decPricePerFoot.The default constructor initializes the Private variables to 0 when the Lumber object is created.Write the statements to create a parameterized constructor,and then write the Dim statement using the parameterized constructor to instantiate and initialize the Lumber object where the number of feet of lumber is 31.5 and the price per foot is 1.85.
سؤال
Write the appropriate block of code to complete a Public procedure based on the following statements:
Private _decTotalSales As Decimal
Public WriteOnly Property TotalSales As Decimal
End Property
سؤال
What is a constructor? Explain the difference between a default constructor and a parameterized constructor.
سؤال
A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.The derived class named InstallationFee contains the CalcFee method.However,the fee formula is as follows: (total * .05)+ 250.Write the function for the derived class.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/60
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: Classes and Objects
1
A ____ encapsulates the attributes and behaviors of the object it creates.

A)constructor
B)property
C)class
D)structure
C
2
Which of the following instantiates a Product object and assigns it to the bookcase variable?

A)Dim bookcase As Product
B)Dim bookcase As New Product
C)Dim Product As bookcase
D)Dim bookcase As String
B
3
A class is anything that can be seen,touched,or used; in other words,a class is nearly any thing.
False
4
In the following instruction,Room is a(n)____. Dim bedroom As New Room

A)object
B)variable
C)class
D)property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
5
The Class statement ends with the keyword(s)____.

A)Class
B)Exit Class
C)End Class
D)Next Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
6
A one-dimensional array's Length property is an example of a ReadOnly property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
7
____ are the actions to which an object can respond.

A)Attributes
B)Events
C)Behaviors
D)Methods
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
8
Every object has ____,which are the characteristics that describe the object.

A)events
B)methods
C)attributes
D)behaviors
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
9
In its simplest form,the Class statement can be used in place of the Structure statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
10
Only an instance of a class-not the class itself-is an object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
11
You can overload any of the methods contained in a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
12
The purpose of a(n)____ in OOP is to encapsulate the properties that describe an object,the methods that allow the object to perform tasks,and the events that allow the object to respond to actions.

A)event
B)class
C)method
D)attribute
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
13
____ are the operations (actions)that the object is capable of performing.

A)Events
B)Attributes
C)Behaviors
D)Methods
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
14
Private variables represent properties that will be seen by anyone using an object created from the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
15
A Public property procedure creates a property that is visible to any application that contains an instance of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
16
When a variable in a class is declared using the Public keyword,it can be used only within the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
17
A class can have multiple default constructors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
18
When naming the Private variables in a class,many programmers use the ____ as the first character and then use camel case for the remainder of the name.

A)dash
B)admiration sign
C)asterisk
D)underscore
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
19
You create a Public property using a ____.

A)Sub procedure
B)Function procedure
C)Property procedure
D)Set block
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
20
Constructors never return a value,so they are always Function procedures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
21
Which of the following clauses allows a derived class named Truck to have the same attributes and behaviors as its base class,which is named Automobile?

A)Inherit Truck
B)Inherits Truck
C)Inherit Automobile
D)Inherits Automobile
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
22
You can create one class from another class.In OOP,this is referred to as ____.

A)encapsulation
B)overloading
C)overriding
D)inheritance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
23
An application needs to calculate the sales tax for an order.Which of the following is a valid example of a variable in a class that can be validated in the Set block of a Property procedure?

A)Private TaxRate As Double
B)Private _dblTaxRate As Double
C)Public TaxRate As Double
D)Public _dblTaxRate As Double
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
24
In a Property procedure,the dataType must match the data type of ____ associated with the Property procedure.

A)all constructors
B)all variables
C)the Public variable
D)the Private variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
25
If you create an auto-implemented property named State,Visual Basic will create a hidden Private variable named ____.

A)State
B)_State
C)STATE
D)state_
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
26
The Tree class is derived from a base class named Plant.Which of the following statements can be used by the Tree class to invoke the Plant class's default constructor?

A)MyPlant.New()
B)MyBase.New()
C)MyTree.New()
D)MyTree.Base
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
27
____ is useful when two or more methods require different parameters to perform essentially the same task.

A)Instantiation
B)Overloading
C)Encapsulation
D)Overriding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
28
A(n)____ is a class method whose sole purpose is to initialize the class's Private variables.

A)signature
B)constructor
C)Get block
D)event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
29
Which of the following is a valid example of an object?

A)Place Order button in an application
B)credit card receipt
C)text box to enter the credit card number in an application
D)a and c
E)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
30
A constructor that has no parameters is called the ____.

A)Property procedure
B)default constructor
C)parameterized constructor
D)Set block
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
31
When two or more methods have the same name but different parameters,the methods are referred to as ____.

A)default methods
B)parameterized methods
C)overloaded methods
D)Property procedures
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
32
A method name combined with its optional parameterList is called the method's ____.

A)signature
B)event
C)attribute
D)behavior
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
33
In a Property procedure,the code contained in the ____ block allows an application to retrieve the contents of the Private variable associated with the property.

A)Set
B)Assign
C)New
D)Get
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
34
The first word in a method name should be a(n)____.

A)verb
B)noun
C)adjective
D)preposition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
35
A Property procedure begins with the keywords ____.

A)Public [ReadOnly | WriteOnly] Property
B)Private [ReadOnly | WriteOnly] Property
C)Start [ReadOnly | WriteOnly] Property
D)Dim [ReadOnly | WriteOnly] Property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
36
The code in the ____ allows an application to assign a value to the Private variable associated with the property.

A)Get block
B)default constructor
C)Set block
D)Property procedure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
37
You indicate that a class is a derived class by including the ____ clause in the derived class's Class statement.

A)Inherits
B)Base
C)Overrides
D)Overloads
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
38
Constructors that contain parameters are called ____.

A)attributes
B)default constructors
C)Set blocks
D)parameterized constructors
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
39
A(n)____ property gets its value from the class itself rather than from the application.

A)WriteOnly
B)ReadOnly
C)Set block
D)Get block
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
40
The Inherits clause is the keyword ____ followed by the name of the class whose attributes and behaviors you want the derived class to inherit.

A)It Inherits
B)InheritsFrom
C)Inherits
D)Inherits_From
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
41
Explain the difference between Public and Private variables for a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
42
Write a Class statement that defines a class named Employee.(The class contains four public variables named EmpID,LastName,FirstName,and PayRate.The EmpID,LastName,and FirstName variables are String variables.The PayRate variable is a Decimal variable.)Then write a statement that creates an Employee variable named partTime and also instantiates an Employee object,assigning it to the partTime variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
43
Write a Class statement that defines a class named Furniture.The class contains two private variables named _strItemNum and _dblPrice.Name the corresponding properties ItemNumber and Price.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
44
The Shoe class is used to create an object that represents a standard shoe.The Shoe class needs to be used in an application for boots.You have copied the Shoe.vb file into the boot application.What do you need to do next to include the file in the boot application?

A)Click PROJECT on the menu bar and then click Add Existing Item.
B)Select the Shoe.vb file from the list of filenames.
C)Click PROJECT on the menu bar and then click Add Class.
D)Click the Add button to add the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
45
Public Class Truck
Private Property Miles As Decimal
Public Function New()
_Miles = 0
End Function
Public Sub New(ByVal decM As Decimal)
Miles = decM
End Sub
Public Overrider Function GetMPG()As Decimal
'returns the miles per gallon for a truck
Return _Miles / 30
End Function
End Class
'derived class
Public Class Car
Receives Truck
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal decM As Decimal)
MyBase.New(decM)
End Sub
Public Function GetMPG()As Decimal
Return _Miles / 18
End Function
End Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
46
The Discount class is used by applications for assigning appropriate discounts to orders.A Public property within the class is made ReadOnly.Which of the following is true about this ReadOnly property?

A)The Set block of code will be entered in the class.
B)The applications using the Discount class will determine the appropriate discount.
C)The application will only be able to retrieve the discount.
D)The application will be able to change the discount.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
47
A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.Write the method's procedure header in the base class that will allow the derived class to override the function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
48
What are classes and objects? How are they used in object-oriented programming?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
49
Public Class Employee
Private _strEmpId As String
Public _decSalary As Decimal
Public Property EmpId As String
Set(ByVal value As String)
_strEmpId = value
End Set
End Property
Public Property Salary As Decimal
Get
Return _decSalary
End Get
Set(ByVal value As Decimal)
Salary = value
End Set
End Property
Public Function New()
_strEmpId = String.Empty
_decSalary = 0
End Sub
End Class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
50
Rather than reuse the Shoe class,you have decided to derive the Boot class from the Shoe class.Which of the following creates the derived Boot class?

A)Private Class Shoe Inherits Boot
B)Private Class Boot Inherits Shoe
C)Public Class Shoe Inherits Boot
D)Public Class Boot Inherits Shoe
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
51
An application has a Private variable named _decGPA.Write the statements for the Property procedure named GPA to validate the value received from the application before assigning it to the Private variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
52
Every object has attributes and behaviors.Describe each of these,including the two types of behaviors an object can have.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
53
What is an auto-implemented property and what does it automatically create?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
54
Write the code for an auto-implemented property named TaxableIncome.The property's data type is Decimal.Then list the two hidden items it creates.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
55
Define the term "inheritance" in object-oriented programming and describe its use.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
56
Write the statements to create the default constructor for the Furniture class statement in the previous problem.Then write the Dim statement to use the default constructor to instantiate a Furniture object,assigning the object to a variable named sofa.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
57
The Lumber class definition contains two Private variables named _dblLength and _decPricePerFoot.The default constructor initializes the Private variables to 0 when the Lumber object is created.Write the statements to create a parameterized constructor,and then write the Dim statement using the parameterized constructor to instantiate and initialize the Lumber object where the number of feet of lumber is 31.5 and the price per foot is 1.85.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
58
Write the appropriate block of code to complete a Public procedure based on the following statements:
Private _decTotalSales As Decimal
Public WriteOnly Property TotalSales As Decimal
End Property
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
59
What is a constructor? Explain the difference between a default constructor and a parameterized constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
60
A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.The derived class named InstallationFee contains the CalcFee method.However,the fee formula is as follows: (total * .05)+ 250.Write the function for the derived class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.