====== Lab 3 ====== ~~NOTOC~~ ** CS203 ** \\ ** Spring 2013 ** \\ ** Feb 8 ** ===== Goals ===== * Practice adhering to a coding style guide (provided) * Practice writing documentation comments (javadoc) ===== Description ===== Now that your Assignment 1 is finished, or close to finished, it's time to polish your code. You've worked hard to implement and test your FSet ADT! In the real world, the next step is to deploy your code so that others may use it. There are a few implications here: - the client programmers who would like to use your code will need to read user documentation so they know how to use FSet collections correctly; - after some time, your FSet clients may find bugs (yes, even though all your tests passed!) or may request additional features they'd like to see in the next release of your FSet collection; - you and/or your new team of programmers will need to implement the new FSet functionality, which requires reading the existing code, and figuring out how it works, and where it needs to be modified. It's a good thing you had the experience and foresight to anticipate the above implications. That's why you adhered to a consistant coding style on your FSet ADT project, and provided your user community with helpful API documentation! ===== Coding Style ===== * Almost every software development organization has its own style guide. This helps ensure that developers can read each other's code. * Coding style includes specifying spacing, indentation, bracket placement, naming conventions for variables, etc. * For one example, I like the Java Program Style Guide published by JavaRanch: [[http://www.javaranch.com/styleLong.jsp]] You have a choice: - Read through JavaRanch's style guide, and apply that style to your FSet code in ''FSet.java'', or - from the Netbeans' ''Source'' menu, choose the first item, ''Format'', to reformat your code. \\ note: since the Netbeans tool is just a program without the aesthetic eye of a human programmer, you should scan the results. Most of the time it makes things clearer and more consistent. Occasionally, it does stupid things to the formatting (where ''stupid'' just means something a human programmer wouldn't do!). ===== Documentation Comments ===== * Documentation comments for Java programs are generated by the ''javadoc'' tool provided with the Java compiler and runtime. * Here is the URL to Oracle's online reference, "How to Write Doc Comments for the Javadoc Tool": \\ [[http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html]] * Add Javadoc comments to your ''FSet'' class header, and also to the static methods of your ''FSet'' class. * Generate your Javadoc comments from Netbeans: under the Run menu, select "Generate Javadoc". * View your generated Doc comments in a browser, and admire the fruits of your labor! ===== Submit your work ===== - Once you've ensured your Assignment 1 code adheres to the given style guide, and that your ''FSet'' class has all appropriate javadoc comments: * ''submit203 lab3 '' - Logout and have a good weekend