Exam 11: Classes and Objects
Exam 1: An Introduction to Visual Basic 201560 Questions
Exam 2: Designing Applications60 Questions
Exam 3: Using Variables and Constants60 Questions
Exam 4: The Selection Structure59 Questions
Exam 5: More on the Selection Structure60 Questions
Exam 6: The Repetition Structure60 Questions
Exam 7: Sub and Function Procedures60 Questions
Exam 8: String Manipulation60 Questions
Exam 9: Arrays60 Questions
Exam 10: Structures and Sequential Access Files60 Questions
Exam 11: Classes and Objects60 Questions
Exam 12: Web Applications60 Questions
Exam 13: Working With Access Databases and Linq60 Questions
Exam 14: Access Databases and Sql60 Questions
Select questions type
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
(Essay)
4.9/5
(37)
A class is anything that can be seen, touched, or used; in other words, a class is nearly any thing .
(True/False)
4.8/5
(41)
Case-Based Critical Thinking Questions Case 1 - chaussure.com
Chaussure.com is an online shoe retailer. The applications for the web site are developed using classes and object-oriented programming techniques.
Which of the following is a valid example of an object?
(Multiple Choice)
4.8/5
(35)
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.
(Essay)
4.9/5
(30)
Problems - Correcting Logic and Code Errors
The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
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
(Essay)
4.9/5
(31)
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.
(Essay)
4.9/5
(44)
A one-dimensional array's Length property is an example of a ReadOnly property.
(True/False)
4.9/5
(40)
Case-Based Critical Thinking Questions Case 1 - chaussure.com
Chaussure.com is an online shoe retailer. The applications for the web site are developed using classes and object-oriented programming techniques.
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?
(Multiple Choice)
4.7/5
(35)
Which of the following instantiates a Product object and assigns it to the bookcase variable?
(Multiple Choice)
4.8/5
(33)
A(n) ____ property gets its value from the class itself rather than from the application.
(Multiple Choice)
4.9/5
(31)
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.
(Essay)
5.0/5
(41)
Every object has ____, which are the characteristics that describe the object.
(Multiple Choice)
4.9/5
(35)
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.
(Essay)
4.7/5
(29)
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.
(Essay)
4.9/5
(30)
Showing 41 - 60 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)