﻿<?xml version="1.0" encoding="utf-8" ?> 
<?xml-stylesheet type="text/xsl" href="../../webpages/courses.xsl" ?>
<!--
/////////////////////////////////////////////////////////////////////////////
//  CSE687codeL10.xml - provides links Lecture #10 materials                 //
//                     on the ECS college server                           //
//                                                                         //
//  Jim Fawcett, CST 2-187, Syracuse University, jfawcett@twcny.rr.com     //
/////////////////////////////////////////////////////////////////////////////
-->

<courses name="Fawcett">

  <btitle>CSE687 Lecture #10</btitle>
  <theme src="../../webpages/CodeTheme.css" />

  <visible>
  <title>CSE687 - Object Oriented Design</title>
  <subtitle>Lecture #10 - Substitution Principle</subtitle>
  <revised>17 February 2009</revised>
  
  <hilight>
    <ifile title="Home">../../webpages/FawcettHome.xml</ifile>&#32;
    <ifile title="Courses">../../webpages/Courses.xml</ifile>&#32;
    <ifile title="Code">../../webpages/Code.xml</ifile>&#32;
    <ilink title="Handouts">www.ecs.syr.edu/faculty/fawcett/handouts</ilink>&#32;
    <ifile title="CoreTech">../../webpages/CoreTechnologies.xml</ifile>&#32;
    <ifile title="Books">../../webpages/Books.xml</ifile>&#32;
    <ifile title="Articles">../../webpages/Articles.xml</ifile>&#32;
    <ifile title="Math">../../webpages/Mathematics.xml</ifile>&#32;
    <ifile title="Research">../../webpages/research.xml</ifile>&#32;
    <ifile title="Masters Projects">../../webpages/MastersProjects.xml</ifile>&#32;
    <ifile title="SWDev">../../webpages/swdev.xml</ifile>&#32;
    <ifile title="WebDev">../../webpages/webdev.xml</ifile>&#32;
    <ifile title="News">../../webpages/news.xml</ifile>&#32;
    <ifile title="OtherLinks">../../webpages/OtherLinks.xml</ifile>&#32;
    <ifile title="SiteDesign">../../webpages/SiteDesign.xml</ifile>&#32;
    <ifile title="Graduates">../../webpages/graduates.xml</ifile>&#32;
    <ifile title="AllPages">../../webpages/AllPages.xml</ifile>&#32;
    <ifile title="Office Hours">../../webpages/OfficeHours.xml</ifile>&#32;
    <notice title="Notices">../../webpages/notices.xml</notice>&#32;
    <html><a href="#contents">Contents</a></html>&#32;
  </hilight>

  <!-- <include src="CoursesNavBar.xml"/> -->

  <hilight>
    <ifile title="CSE681-SWMAA">../../webpages/CSE681.xml</ifile>&#32;
    <ifile title="CSE686-IP">../../webpages/CSE686.xml</ifile>&#32;
    <ifile title="CSE687-OOD">../../webpages/CSE687.xml</ifile>&#32;
    <ifile title="CSE775-DO">../../webpages/CSE775.xml</ifile>&#32;
    <ifile title="CSE776-DP">../../webpages/CSE776.xml</ifile>&#32;
    <ifile title="CSE778-AWP">../../webpages/CSE778.xml</ifile>&#32;
    <ifile title="CSE784-SWS">../../webpages/CSE784.xml</ifile>
  </hilight>

  <hilight>
    <ifile title="Lecture #01">../Lectures/CSE687CodeL1.xml</ifile>&#32;
    <ifile title="Lecture #02">../lectures/CSE687CodeL2.xml</ifile>&#32;
    <ifile title="Lecture #03">../Lectures/CSE687CodeL3.xml</ifile>&#32;
    <ifile title="Lecture #04">../Lectures/CSE687CodeL4.xml</ifile>&#32;
    <ifile title="Lecture #05">../Lectures/CSE687CodeL5.xml</ifile>&#32;
    <ifile title="Lecture #06">../Lectures/CSE687CodeL6.xml</ifile>&#32;
    <ifile title="Lecture #07">../Lectures/CSE687CodeL7.xml</ifile>&#32;<br/>
    <ifile title="Lecture #08">../Lectures/CSE687CodeL8.xml</ifile>&#32;
    <ifile title="Lecture #09">../Lectures/CSE687CodeL9.xml</ifile>&#32;
    <ifile title="Lecture #10">../Lectures/CSE687CodeL10.xml</ifile>&#32;
    <ifile title="Lecture #11">../Lectures/CSE687CodeL11.xml</ifile>&#32;
    <ifile title="Lecture #12">../Lectures/CSE687CodeL12.xml</ifile>&#32;
    <ifile title="Lecture #13">../Lectures/CSE687CodeL13.xml</ifile>&#32;
    <ifile title="Lecture #14">../Lectures/CSE687CodeL14.xml</ifile>&#32;<br/>
    <ifile title="Lecture #15">../Lectures/CSE687CodeL15.xml</ifile>&#32;
    <ifile title="Lecture #16">../Lectures/CSE687CodeL16.xml</ifile>&#32;
    <ifile title="Lecture #17">../Lectures/CSE687CodeL17.xml</ifile>&#32;
    <ifile title="Lecture #18">../Lectures/CSE687CodeL18.xml</ifile>&#32;
    <ifile title="Lecture #19">../Lectures/CSE687CodeL19.xml</ifile>&#32;
    <ifile title="Lecture #20">../Lectures/CSE687CodeL20.xml</ifile>&#32;
    <ifile title="Lecture #21">../Lectures/CSE687CodeL21.xml</ifile>&#32;<br/>
    <ifile title="Lecture #22">../Lectures/CSE687CodeL22.xml</ifile>&#32;
    <ifile title="Lecture #23">../Lectures/CSE687CodeL23.xml</ifile>&#32;
    <ifile title="Lecture #24">../Lectures/CSE687CodeL24.xml</ifile>&#32;
    <ifile title="Lecture #25">../Lectures/CSE687CodeL25.xml</ifile>&#32;
    <ifile title="Lecture #26">../Lectures/CSE687CodeL26.xml</ifile>&#32;
    <ifile title="Lecture #27">../Lectures/CSE687CodeL27.xml</ifile>&#32;
    <ifile title="Lecture #28">../Lectures/CSE687CodeL28.xml</ifile>&#32;
  </hilight>

  <hilight>
    <html><a href="#Contents">Contents</a></html>&#32;
    <html>
      <a href="../../webpages/cse687.xml#Syllabus">Syllabus</a>
    </html>&#32;
    <ifile title="SG - Design">StudyGuideDesign.xml</ifile>&#32;
    <ifile title="SG - Templates">StudyGuideTemplates.xml</ifile>&#32;
    <ifile title="SG - Class Relationships">StudyGuideClassRelationships.xml</ifile>&#32;
  </hilight>
  
  <section title="Web Resources:">
    <ilink title="Stroustrup's Home Page">www.research.att.com/~bs/homepage.html</ilink>,
    <ilink title="Assoc. of C/C++ Users">www.accu.org</ilink>,
    <ilink title="C++&#160;at&#160;Microsoft">www.gotw.ca/publications/standard_c++_meets_managed_c++.htm</ilink>, 
    <ilink title="Code&#160;Project">www.codeproject.com</ilink>,
    <ilink title="Sells&#160;Brothers">www.sellsbrothers.com</ilink>,
    <ilink title="Guru&#160;of&#160;the&#160;Week">www.gotw.ca</ilink>,
    <ilink title="C/C++&#160;User's&#160;Journal">www.cuj.com</ilink>,
    <ilink title="devCentral">devCentral.iftech.com</ilink>,
    <ilink title="Dr.&#160;Dobb's&#160;Journal">www.ddj.com</ilink>,
    <ilink title="Boost&#160;Library">www.boost.org</ilink>,
    <ilink title="techNetCast">technetcast.ddj.com</ilink>
  </section>
  
  <isection title="Office Hours:">
    <ifile title="Instructor &amp; TAs">../../webpages/officeHours.htm</ifile>
  </isection>
  
  <section title="Content:">
  <html><a name="Contents" id="Syllabus"/></html>
    This lecture covers the Liskov Substitution Principle and its powerful applications in design.  Polymorphism follows
    directly from Liskov Substitutability and helps us build loosely coupled systems.
    <olist>
      <litem>
        <html>
          <a href="../../webpages/cse687.xml#Syllabus">Syllabus</a><br/>Describes topics to be covered,
          reading material for you to digest <u>before coming to class</u>, and due dates
          for the assigned projects.
        </html>
      </litem>
      <litem>
        <file title="Project #2">../projects/pr2s09.doc</file>
      </litem>
      <litem>
        <ifile title="Project #2 Help">../code/GraphHelp</ifile>, 
        <ifile title="Help with Graph implementations">../code/GraphHelp</ifile>
      </litem>
<!--
      <litem>
        <file title="XML Presentation">../presentations/xml.ppt</file>
      </litem>
      <litem>
        <ifile title="XMLParsing">../code/xmlParsing</ifile> or <ifile title="XMLTran">../code/xmlTran</ifile><br/>
        Two modules that do basic XML handling - building XML strings and pulling them apart.  They do not understand
        XML namespaces or schemas, nor do they build a DOM.  Either one will provide some parsing parts for Project #2.
      </litem>
      <litem>
        <file title="Project #1 Test Code">../code/Project1TestCodeSp05</file>
      </litem>
-->
      <litem>
        <file title="Class Layout demo">../code/ClassLayout</file>
      </litem>
      <litem>
        <file title="Using Inheritance">../presentations/Using Inheritance.ppt</file>
        Discusses several distinct design uses for inheritance.
      </litem>
      <litem>
        The Command Pattern is an interesting application of inheritance:<br/>
        <ind>
          <file title="Simple Callbacks - Function Pointers">..\code\demos\callback</file>
          <file title="Callbacks - Command Pattern">..\code\demos\callback</file>
          <file title="Callbacks - Commands to either global and member functions">..\code\demos\callback</file>
        </ind>
      </litem>
      <litem>
        <file title="Virtual Function Pointer Table structure">../presentations/vtbl.vsd</file>
      </litem>
      <litem>
        <file title="hiding">../code/hiding</file>
        Illustrates errors caused by inappropriate overloading and use of default parameters.
      </litem>
      <litem>
        <file title="importance of virtual destructors">../code/virtualfunctions</file>
        Demonstrates problems caused by omission of virtual destructors.
      </litem>
<!--
      <litem>
        <file title="Traceable Project">../code/traceable</file>
        This demonstrates the Open/Closed Principle by building a trace class that is very string-like, using
        the std::string class via inheritance without modifing std::string in any way.  We get an enhanced 
        string that knows a little about tracing program operation.
      </litem>
-->
      <litem>
        <file title="Vectors of Polymorphic Objects - Example Project">../code/hiding</file>
        Shows how to use heterogeneous objects in an STL container.
      </litem>
      <litem>
        <file title="Liskov Substitution Principle">../presentations/principles.ppt#264,15,The Liskov Substitution Principle</file>
        This is a fundamental OOD principle, with some surprising subtleties when using C++ (see example project below).
      </litem>
      <litem>
        <file title="Non-Virtual Interface Principle - a code example: see comments for explaination">../code/NonVirtualInterfaces</file>
        Liskov Substitutibility does not demand public virtual functions.
      </litem>
      <litem>
        <file title="C++ Casts">../code/casts</file>
      </litem>
<!--
      <litem>
        <file title="Heterogeneous List Structure">../code/demos/hetlist</file>
        Unusual use of Liskov Substitution
      </litem>
      <litem>
        <file title="Open/Closed Principle">../presentations/principles.ppt#256,4,The Open/Closed Principle</file>
        Another fundamental OOD principle that argues for using inheritance "hooks" and template-based classes.
      </litem>
-->
      <litem>
        <ifile title="Design Rules">../presentations/DesignRules.ppt</ifile><br/>
        Design rules and idioms that transcend Object Oriented Design.
      </litem>
    </olist>
  </section>  
  <p/><hr/><p/>
  </visible>
</courses>
