Summing Up

This lesson has shown how to refactor an existing program into functions of several different types, and has demonstrated the roles of arguments and local variables. You learned that cohesion and coupling are key issues in refactoring, and that whitespace can help identify groups of lines as having the right level of cohesion to be pulled out into a separate function.

Get SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.