Week 2a - Abstract Data Types

Emulating primitive types

Synopsis:

Last time we discussed the course syllabus, exams and projects. Today we focus on implementing Abstract Data Types using the C++ Programming Language.

Readings and Activities for the Week:

Glossary of Terms

Lecture Content:

  1. Thinking about Projects:

    In these video lectures we will discuss Sample Projects, similar to the ones you will be implementing. In the corresponding synchronous lectures the instructor will provide some limited guidance for each of your projects. All code will be developed using C++ and the Standard C++ Library with latest version of Visual Studio .

    How will your submissions be evaluated? Code grade sheet, Grading policy

  2. Primary Focus Today - Abstract Data Types:

    Abstract Data Types Presentation, pptx
    What does it take to make objects of your class behave like built in types?

    STR class
    This is the code used as the primary example in the presentation, above. It is a good example of an ADT. However, you should prefer the std::string class for all your development work.

    C++ Operators pptx

    vector3D
    An example of an Abstract Data Type that is rich in operators. Shows the accepted style for building ADT classes with mathematical operations.

    Design Principles
    Principles that guide Object Oriented Design.
  3. Looking ahead, getting to know templates:

    Quick overview

    Templates Presentation, pptx
    Templates are one of the terrific features of the C++ language. Almost all of the Standard Template Library (STL) is implemented with templates, and they are very useful in day-to-day programming.

    fully functional C++ Properties, courtesy of templates
    This project demonstrates how easy it is to extend the C++ language. C++ doesn't natively support properties but it's not hard to provide them.

    First template demo
    Provides a simple type to string conversion facility.

    Template Code Examples
    Basic and some more advanced template examples.

    STL Container examples
    This code contains a simple example of the new Variadic Template functionality in the "inserter" project.

    Survey of STL Container Classes
    Simple demos of almost all of the STL containers.

    STL Template-based Functors and Algorithms
    Another set of template code examples, including functors, algorithms, and several other things you need to know.

    Functor examples

    Excellent template Q&A
    This is a good place to find information to supplement class texts and notes.

  4. Preparation for Synchronous Discussion:

    • Look carefully at the ADT presentation. Be prepared to discuss differences between copy and move construction.
  5. Lecture Take-away:

    The most important things covered today were:
    • Details provided in the ADT presentation and STR class.
    Next week, in Wk 3a, we will begin discussing C++ Templates, using the resources listed above, so please review this weekend.

  1. Both Workflowy and gliffy are Google tools, available without charge, from Google play store. It works best to install them from the chrome browser.