Está en la página 1de 2

Week end Visual Basic .Net Quiz one 1.

Briefly explain the following four terms (4 Marks) Abstraction Encapsulation Inheritance Polymorphism

2. The following Visual Basic .Net statements define a class named CardHolder:
Class CardHolder Dim Limit as Decimal End class

Add statements into the above class definition so that all instances of CardHolder will automatically have a Limit value of 5000 when instantiated.
[Note: your answer should not change the declaration statement for the class-level variable Limit in the class definition] (4 marks)

3. All .Net languages (e.g. Visual basic.Net) compile to MSIL (Microsoft Intermediate Language) codes. When MSIL codes are executed, the Common Language Runtime (CLR) converts the MSIL codes into the computers native instructions and executes them. Describe the advantage made possible to PROGRAMMERS buy having all .Net languages compile to common MSIL instructions. (4 marks)

4. Convert the following pseudo code to Visual Basic coding. (5 Marks)


For 10 times Set the summary to zero For 5 times Input number Add number to the summary End for

Best of regards

Calculate average Print the average End for

5. Define the following terms: (3 marks) i. ii. iii. Event Class Constructor

6. Identify and explain the reasons for the Two syntax errors found in the following program codes: (4 marks)
Const TaxRate As Decimal statement 1 TaxRate = 0.08 statement 2

End of Quiz

Best of regards

También podría gustarte