Lecture #4 - Abstract Data Types

Web Resources:

CppReference.com, CPlusPlus.com, C++ TechLinks
Going Native 2013 - many experts
Herb Sutter's Blog, Herb Sutter on C++11, Herb Sutter keynote - Going Native 2012
Scott Meyer's Blog, S.M. on thread suspension, S.M.: C++11 Sampler
Stroustrup's Home Page, Code Project, Boost Library

Content:

This lecture discusses the notion of an Abstract Data Type (ADT). We demonstrate how to use the C++ language to implement an ADT.
  1. Syllabus
    Describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. The book C++ Primer Plus, by Stephen Prata, is now in the Sci-Tech library, on reserve, for your use. You will find this text very readable, with tons of small code fragments that show you how to do almost any basic operation you may need to do. You can not take this book home, but may use it in the library for several hours.
  3. Help Session this Friday: 1st group at 9:00 am in CST 4-201, 2nd group at 10:30am

  4. Project #1

    Project #1 statement
    Dissecting the Project #1 statement - What is hard? What is easy? Suggestions.

    Project code - Goals, Tasks, Structure, design trade-offs, C++ specific details.

    Recommended strategy:
    Define packages for at least the following:
    test executive, test input acquisition, tokenizing helpers, and display.

    Resources for Project #1:
    Project1HelpS17, C++ Survival Guide, Projects Menu at top of this page
    Project Properties, doc
    Project Submissions, Compile.bat and Run.bat

  5. first look at STL notes
    The Standard Template Library (STL) provides a set of useful containers, iterators, and algorithms. You can use the containers without knowing too much about how templates work. We will get to that soon.

    basic STL code demos
    Shows how easy it is to use vectors, lists, sets, and maps.

  6. Equivalent Syntaxes
    Shows how to call constructors in a variety of contexts.
  7. object layout
    Fundamental information about how objects work.
  8. 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 a good example of an ADT. It is presented as a nice example. You should prefer the std::string class for all your development work.

    C++ Operators ppt

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

  9. Excellent C++ Q&A - Marshall Cline, Excellent reference - CppReference.com
    If you are only going to go to a couple of places to find information to supplement class texts and notes, then go here!
  10. Software Design
  11. These are the most important items from today's lecture:

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

    STR class
    This is a good example of an ADT. It is presented as a nice example. You should prefer the std::string class for all your development work.

CST strip