Lab 3

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:

  1. 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;
  2. 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;
  3. 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:

  1. Read through JavaRanch’s style guide, and apply that style to your FSet code in FSet.java, or
  2. 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

  • 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

  1. 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 <your assignment 1 folder>
  2. Logout and have a good weekend!
courses/cs203-201301/labs/lab3.txt · Last modified: 2013/02/08 01:51 by mlsmith
VCCS Top Events Extended Site Search Login Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0