|
|
..
|
string method reference example
Box firstName ofClass Str
Box lastName ofClass Str
Output "Please enter your first name: "
Input firstName
Outputln firstName
Output "Please enter your last name: "
Input lastName
Outputln lastName
If (firstName.equals(lastName)) then
Outputln "Your first name is really the same as your last name?"
ElseIf (firstName.equals("Judy")) then
Outputln "Judy, Judy, Judy"
ElseIf (lastName.length() > 9) then
Outputln "3, 2, 1 "+lastName+" shoots and scores!"
Else
Outputln "Hello " + firstName + " " + lastName
EndIf
|
|