After studying the module you should understand the principles and techniques associated with modular software development.
After studying the module you should understand the core syntactic structures of Visual Basic.
After studying the module you should be able to read critically sections of code written by others.
As this question does not involve a project, when you are asked to write 'code' we would prefer that you write design code. However, we will accept correct VB code that follows module conventions and that is restricted to the VB syntax introduced in the module.
It is proposed to write the following method for a string utility class.
Method Q2a12J(inputA As String, inputB As String) As Boolean result As Boolean
index As Integer
Set result To False
If inputA.Length = inputB.Length Then
Set result To True
Set index To 0
While (result And index < inputB.Length)
If Not inputB.Chars(index).toString() = "?" Then
If Not inputA.Chars(index) = inputB.Chars(index) Then
Set result To False
End If
End If 'Line A
Set index to index + 1
EndWhile
End If
Return result
End Method