Tuesday, December 8, 2015

reading book - Exceptional C++

Dec. 8, 2015

 Start to read the book Exceptional C++ today, here is the link of the book:

  http://www.amazon.ca/Exceptional-Engineering-Programming-Problems-Solutions/dp/0201615622

  My best learning experience on first hour is this example:

  Item 18. Code Complexity—Part 1
  Item 19. Code Complexity—Part 2


  The good exercise, count "Nonexceptional Code Paths", excellent metrics to calculate in the example. How many does Julia count? (keep it secret!)

  String EvaluateSalaryAndReturnName( Employee e )
{
        if( e.Title() == "CEO" || e.Salary() > 100000 )
       {
              cout << e.First() << " " << e.Last() << " is overpaid" << endl;
        }
        return e.First() + " " + e.Last();
}

To be continued.

No comments:

Post a Comment