Code Inspections - DUE TODAY


In this lab, you will be doing code inspections on code from another group in the class. You will also be developing a coding standard to be used in all future Java assignments.

Part A - 2 hours

  1. Each group should find another group to work with. If there are an odd number of groups, there should be one group consisting of three previous groups.
  2. Exchange code for the freeway speed assignment and have the other group test your code. Try to find problems with the other group's program and create a list of suggestions that would make it better. Do this step without looking at their code. If you haven't finished the freeway speed assignment yet, simply give the other group what you have done so far.
  3. After testing the functionality of the the program, do code inspections of each other's code. Follow the code inspection process described by Ganssle on pages 18-20 of "The Art of Designing Embedded Systems". Each group should paraphrase each section of their code. After paraphrasing each region, the other group should discuss the implementation of the region to identify any major or minor issues. For any suggestions that are found, add comments to the code to identify them. Use the format in the following example for inspection comments:

    /**
     * INSPECTION COMMENTS
     * This code could potentially cause a divide by zero error.
     */
    int divide( int a, int b ) {
      
      return a / b;
    }
    
  4. After each group has added the inspection comments to the other group's code, get checked off by the TA for part A and turn in the code online to lab3partA. The entire code inspection process should take you no less than 2 hours.

Part B - 1 hour

  1. Read the Java coding standard.
  2. Rewrite your code for the freeway speed lab so that it conforms to the coding standard. When you have finished and tested your code, resubmit your code under the turnin for lab3partB. Also, have the TA check you off for completing part B.