module addressbook; behavior GetEmail { void act(String args[]){ if (args.length != 2) { standardOutput<-println( "Usage: salsa addressbook.GetEmail " ); return; } getEmail(args[0], args[1]); } void getEmail(String uan, String name){ try{ AddressBook book = (AddressBook)AddressBook.getReferenceByName(new UAN(uan)); standardOutput<-print(name + "'s email: ") @ book<-getEmail(name) @ standardOutput<-println(token); } catch(MalformedUANException e){ standardOutput<-println(e); } } }