The following checks to see if
the user did input the details
If; the
return of the delivery cost array index is equal to “address” and if use read
array “main” method (send name constant) = default or:” use read array
method(send Address constant) = default or
use read array method(send Phone constant)= default . Here I forgot to mention what the index
value is for delivery cost, this is 0; so I will use the defult constant converted
to an int. The above is just used to check if input has been recorded, so I
have “null” because no text doesn’t equal 0.
Then
use invalid input method
if use read array “main” method (send name constant)=
default
Then use invalid input method
The two
lines of code above are not needed as I combined a check for the non-delivery
input into the other check
The following compiles the summary to display
Declare
string called “customer detail” and set to the following; local
“Name:” use read array method(send name
constant) line break
“Address:”
use read array method(send Address constant) line break
“Phone:”
use read array method(send Phone constant) line break
Return
customer detail this sends the string to the caller of the method
No comments:
Post a Comment