Apologies if this comes through more than once - I forgot to send in plain text without attachments!
In case you dont know Im new to Java . Im working out an interface/class structure for part of an app I want to convert from Perl to Java and I have a question about the best way to provide access to variables to the client programmer: Is it best to have variables you want the client programmer to access just made public or is it best to provide access to them via a get/set method? >From my limited reading of Thinking in Java I would think it best to hide the implementation from the user and provide methods to access these variables e.g. setThreshold and getThreshold modify the private variable threshold is that correct or am I way off the mark!? Thanks for any clarification. Nath ---------------------------------------------------------------------------- ------ Dr. Nathan S. Haigh Bioinformatics PostDoctoral Research Associate Room B2 211 Tel: +44 (0)114 22 20112 Department of Animal and Plant Sciences Mob: +44 (0)7742 533 569 University of Sheffield Fax: +44 (0)114 22 20002 Western Bank Web: www.bioinf.shef.ac.uk Sheffield www.petraea.shef.ac.uk S10 2TN ---------------------------------------------------------------------------- ------ --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0615-2, 12/04/2006 Tested on: 09/05/2006 12:18:14 avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0615-2, 12/04/2006 Tested on: 09/05/2006 12:19:29 avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
