Download
layout and style n.
Skip this Video
Loading SlideShow in 5 Seconds..
Layout and Style PowerPoint Presentation
Download Presentation
Layout and Style

Layout and Style

213 Vues Download Presentation
Télécharger la présentation

Layout and Style

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Layout and Style Chapter 31

  2. Outline • Laying Out Control Structures • Laying Out Individual Statements • Laying Out Comments • Laying Out Routines • Laying Out Classes

  3. Which style is better? if ( expression ) one-statement; if ( expression ) { one-statement; } Format single-statement blocks consistently

  4. Which style is better?

  5. Which style is better?

  6. Which style is better? ReadEmployeeData(maxEmps,empData,inputFile,empCount,inputError); ReadEmployeeData(maxEmps, empData, inputFile, empCount, inputError);

  7. Good or bad?

  8. Good or bad?

  9. Good or bad?

  10. Good or bad?

  11. Good or bad? // comment zero CodeStatementZero; CodeStatementOne; // comment one CodeStatementTwo; CodeStatementThree; // comment zero CodeStatementZero; CodeStatementOne; // comment one CodeStatementTwo; CodeStatementThree;

  12. Good or bad?