Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Knowledge Check 1. If the TextLength property of a TextBox object is less than 1

ID: 3852739 • Letter: K

Question

Knowledge Check

1. If the TextLength property of a TextBox object is less than 1, what does that tell you?

2. What properly is used to ensure that the user has entered all digits in a MaskedTextBox object?

3. What properly can you use to specify the sequence of objects that will be selected when the user presses the tab key?

4. What are the names of the three tiers in a three-tiered program structure? What occurs in each of the three tiers?

5. In a three-tiered program structure, which tiers are allowed to communicate with each other?

6. Identify the three steps to create a new class in a Visual Basic program.

7. Write the code to instantiate the objEmployee object based on the Employee class.

8. When is a class constructor executed?

9. Write the code to instantiate the objVehicle object based on the Vehicle class and to pass the following values to the object: Color, Model, Engine. Write the New statement in the Vehicle class.

10. Write a statement to call the ComputeDiscount procedure in the objDiscountItem object.

11. Explain the benefits of using separate classes in a program.

12. Complete the following sentence: Inheritance allows one class to inherit ____________ and ______________ from another class.

13. Describe the difference between a base class and a subclass when using inheritance.

14. What entry must be included in the Class statement of a subclass? 15. What is the first statement that must be coded in a subclass constructor?

16. What is an overridable procedure? Why is it used?

17. In a class, can an attribute be referenced that is not defined in the class? How is this attribute reference resolved?

18. What is a comma-delimited text file?

19. When an IO.StreamWriter is created, what does the IO.File.AppendText entry mean?

20. What is the difference between the Write procedure and the WriteLine procedure in the IO.StreamWriter class?

Explanation / Answer

1.

The number of characters in a string for tasks such as searching for specific strings of text within the text of the control, where knowledge of the total number of characters is needed.

2.

If you want to use your own custom data types with ValidatingType, you must implement a static Parse method that takes a string as a parameter.

4.

Three-tier architecture is an architectural deployment style that describe the separation of functionality into layers with each segment being a tier that can be located on a physically separate computer.

Using this architecture the software is divided into 3 different tiers:

5.

Client server architecture allows to communicate with each other.

6.

The three steps to create a new class in a Visual Basic program.:

8.

Constructor of any class gets executed only when an object of that class is being created either dynamically using new or locally.

11.

The advantage of using classes instead of just subroutines is that classes create a level of abstraction that allow you to write cleaner code.

One key indication that you should switch to classes is if you're constantly adding parameters to your functions and subroutines. In this case, it's almost always best to use classes.

13.