Examlex
Problems - Correcting Logic and Code Errors
The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
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
Present Value
The equivalent value today of cash flows or a sum of money anticipated in the future, using a predetermined return rate.
Annuity
A financial product that pays out a fixed stream of payments to an individual, primarily used as an income stream for retirees.
Interest Rate
Interest rate is the percentage charged by a lender to a borrower for the use of assets, adjusting for the cost of credit or the return on investment.
Lump Sum
A single payment made at a particular time, as opposed to several smaller installments.
Q29: The _ method pads the string on
Q33: If the intInventory variable contains the value
Q37: You can use the _ to open
Q40: The following array is declared and initialized:
Q45: On a Web form, use the check
Q52: The _ method displays a message box
Q60: Problems - Correcting Logic and Code Errors
Q297: Backing up a database rearranges how the
Q507: When you create a table in Datasheet
Q606: To start Access, click the Start button