Web Resources:
CppReference.com, CPlusPlus.com, C++ TechLinksGoing 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 is devoted to the notion of Encapsulation and basic Object Oriented Design relationships.-
Readings for Lecture #3
-
Glossary of Terms
-
Encapsulation:
Restricting all access to a class's state to member functions of the class.
This ensures that the class state is always valid, since only the class's methods initialize and change it.
-
Encapsulation:
- The Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
-
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, database, database items, 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 - Quick look at STL Demo Code
-
Code you download, run, read, and understand. If you don't then ask questions.
You need to look at and write a lot of code if you want to do well in this class!Code Description TestClass Illustrates basic parts of C++ class and how they get activated in other C++ code. STLContainers Basic examples of STL Containers and Iterators, important for Project #1 and most of the code you will write. Relationships Shows how you implement each of the class relationships. The code represents these classes. STR A String class - Code we will look at in detail this week. It shows you how to write each of the important parts of a C++ class. -
Encapsulation:
-
Class Relationships,
Class Layout Diagram,
Class Relationships - code example
Read this code and understand thoroughly - visit Stroustrup (class text) as needed - class relationships - more details
- class layout
- Equivalent Syntaxes
-
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. - Software Design
- Abstract Data Types Presentation
-
These are the most important items from today's lecture:
Encapsulation Principle, Encapsulation Presentation Class Relationships, Class Layout Diagram, Class Relationships - code example
Read this code and understand thoroughly - visit Stroustrup (class text) as needed