Style Guide - googleinterns/step73-2020 GitHub Wiki

Welcome to the CoffeeHouse Style Guide wiki!

This wiki specifies the general style guide this project is following, as well as certain naming conventions for test method names and the structuring of Javadoc.


  • Javadoc is present for every public class, and every public or protected member of such a class.

  • Each Javadoc block begins with a brief summary fragment. This fragment is very important because it is the only part of the text that appears in certain contexts such as class and method indexes.

    • This is a fragment—a noun phrase or verb phrase, not a complete sentence. However, the fragment is capitalized and punctuated as if it were a complete sentence: /** Returns the customer ID. */
  • The basic formatting of Javadoc blocks is as seen in this example:

    * Multiple lines of Javadoc text are written here,
    * wrapped normally...
    public int method(String p1) { ... }

Test Method Names

  • Underscores are used to separate logical components of the name, with each component written in lowerCamelCase: <methodUnderTest>_<state>, for example pop_emptyStack.
  • The functions setUp() and tearDown() are to be used for actions that happen before and after each test, respectively.
⚠️ ** Fallback** ⚠️