CIS-260 Home http://www.c-jump.com/bcc/

Software Design Guidelines


  1. Software Design Guidelines
  2. Public Interfaces
  3. Roles of Constructors
  4. Object Reuse
  5. Descriptive Names
  6. Keeping Scopes Small
  7. Maintainability
  8. The development process
  9. Development process stages

1. Software Design Guidelines


2. Public Interfaces


3. Roles of Constructors


4. Object Reuse


5. Descriptive Names


6. Keeping Scopes Small


  • Data abstraction and hiding closely relates to the scopes of variables and operations.

  • In view of good design we must pursue the goal of localizing attributes and behaviors as much as possible.

  • This greatly improves debugging, testing, documentation, and extensibility of the entire system.

  • Keeping minimal scopes emphasizes good programming style.

  • Consider:

    
        int temp;
        void swap( int* pleft, int* pright )
        {
            temp = *pleft;
            *pleft = *pright;
            *pright = temp;
        }
    
    
  • Better:

    
        void swap( int* pleft, int* pright )
        {
            int temp = *pleft;
            *pleft = *pright;
            *pright = temp;
        }
    
    

7. Maintainability


8. The development process


9. Development process stages