Home Comments in 143

New expectations

Please note that our expectations for commenting in CSE 143 are higher then they were in CSE 142. The other sections of the guide will cover this in more detail, but as a summary, you are expected to always include the following:

  • A class header comment for each file containing your name, section, date, and a summary of the code.
  • Method header comments on all constructors and methods, both public and private. Method header comments should:
    • Document all preconditions and postconditions – the contractual obligations of that method.
    • Omit all implementation detail.
    • Omit any assumptions about the client.
  • Inline comments for any complex segments of code. Inline comments should:
    • Describe why you main non-obvious choices
    • Be used to delineate different "sections" of your code where appropriate
    • Not describe things that are obvious

Some of these expectations are the same as they were in 142, and others are more elaborate versions.