Lecture 20
7
Return an int
•
•Some designs/languages use int return code
•C and Unix shell convention:
–return 0 when all goes well
–return some n > 0 to report an error
•Design encourages a message catalog:
–look up message String using return code as a key (catalog might be an ArrayList)
–provide a catalog in user’s native language,  for internationalization  (I18N)
•You could invent an Object to return