Lecture overview -- Keyboard shortcut: 'u'  Source programs in previous lecture -- Keyboard shortcut: 'p'  Source programs in next lecture -- Keyboard shortcut: 'n'  Course home

Source Programs
Abstraction Mechanisms, Part 1

The Note Context in the rightmost column is only shown in case an annotated program exists. - You can navigate to the annotated program via the annotated slide view (= 'the note context').

Class Point in C#.Point.csSlide context--
Class Point i C++ together with a main function - member functions defined in class definition.point1.ccSlide context--
Class Point i C++ together with a main function - member functions defined outside the class.point2.ccSlide context--
Class Point i C++ - with an output function for points.point3.ccSlide context--
The class design of class Point.point4.hSlide context--
Struct Point in C++ .point2.ccSlide context--
A namespace with struct Point in C++ .point-namespace-1.ccSlide context--
Same with illustration of ambiguities relative to the global namespace.point-namespace-2.ccSlide context--
The Point class.point.hSlide context--
Implementation of the Point class constructors.point.ccSlide context--
The Rectangle class.rect.hSlide context--
Implementation of the Rectangle class constructors.rect.ccSlide context--
Sample Rectangle constructions.prog.ccSlide context--
Illustration of legal and illegal member initializers - constructor chaining is not supported.point-constructors-problems.ccSlide context--
The Rectangle class - header file.rect.hSlide context--
Rectangle constructors - with initialization.rect-ini.ccSlide context--
Rectangle constructors - with default initialization and subsequent assignments.rect-ass.ccSlide context--
Class Point with a variety of constructors.point.hSlide context--
Funny implementations of constructors.point.ccSlide context--
Use of constructors - with automatic variables of class type.prog2.ccSlide context--
An additional Point construction attempt - a trap.prog2-more.ccSlide context--
Class Point with a destructor.point.hSlide context--
Implementation of the destructor that reveal its activation.point.ccSlide context--
Illustration of destructor activation when automatic variables go out of scope .prog2.ccSlide context--
Class Point - with a pointer representation .point.hSlide context--
Implementation of class point - with an insufficient destructor .point.ccSlide context--
A sample program with memory leaks.prog.ccSlide context--
Class Point - with a pointer representation - same as before.point.hSlide context--
Implementation of class point - now with a destructor that deallocates the Point representation.point.ccSlide context--
A sample program - now without memory leaks.prog.ccSlide context--
A class Resource and its application in the function use_resource - principles only.raii-pattern-0.ccSlide context--
A class Resource and its application in the function use_resource - compilable version.raii-pattern-1.ccSlide context--
The usual class Point - nothing of particular interest.point.hSlide context--
An illustration of auto_ptr<Point>.auto-ptr1.ccSlide context--
Passing Point objects in and out of functions.prog5.ccSlide context--
Class LineSegment WITHOUT copy constructor and and WITHOUT assignment operator.point-lineseg.hSlide context--
The corresponding cc file - not particularly relevant.point-lineseg.ccSlide context--
A function that constructs, initializes and assigns LineSegments.prog.ccSlide context--
Class LineSegment WITH a copy constructor and and WITH an assignment operator.point-lineseg.hSlide context--
The corresponding cc file with implementations of the copy constructor and the assignment operator.point-lineseg.ccSlide context--
A function that constructs, initializes and assigns LineSegments.prog.ccSlide context--
istream conversion to bool.io-stream-1.ccSlide context--
Class Point with conversion constructor and conversion operator, from and to double.point1.hSlide context--
Class Point implementation.point1.ccSlide context--
Use implicit of the conversions.prog1.ccSlide context--
Class Tripple with Tripple(Point) constructor and a Point conversion operator.point1.hSlide context--
Class Tripple implementation.point1.ccSlide context--
Illustration of conversions.prog1.ccSlide context--
A variant of class Point with static members.point.hSlide context--
Implementation of class Point.point.ccSlide context--
A client of class Point.prog.ccSlide context--
A variant of class Point with static member function for the defaultPoint.point.hSlide context--
Implementation of class Point.point.ccSlide context--
A client of class Point.prog.ccSlide context--
A variant of Point with cached polar representation.point.hSlide context--
The implementation of class Point - with compilation problems.point.ccSlide context--
A variant of Point with cached polar representation.point.hSlide context--
The implementation of class Point - with compilation problems.point.ccSlide context--
A simple client program of Point.prog.ccSlide context--
Class Point - almost the usual header file.point.hSlide context--
Class Point - a variant with explicit use of this.point.ccSlide context--
A sample use of points, with emphasis on moving.prog.ccSlide context--
A function f get access to the private state of both class A and B.friends-sit6.ccSlide context--
Class A provides friendship to class B.friends-sit2.ccSlide context--
Class A and B are mutual friends of each other - problems in this version.friends-sit4.ccSlide context--
Class A and B are mutual friends of each other - this version is OK.friends-sit3.ccSlide context--
A variant were we want ma to be a friend of B and mb to be friend of A - problems in this version.friends-sit5.ccSlide context--
Class Point - header file.point.hSlide context--
Class Point - implementation - not important for this example.point.ccSlide context--
The program including implementation of friend moving functions.prog.ccSlide context--
Class Point - header file.point.hSlide context--
Class Point - implementation - including the implementation of operator<<.point.ccSlide context--
The program that uses the operator - nothing new here.prog.ccSlide context--
Class Point - header file.point.hSlide context--
Class Point - implementation - including the implementation of operator<<.point.ccSlide context--
The program that use the operator.prog.ccSlide context--
Class Point with operators as members.point.hSlide context--
Definition of Point member functions.point.ccSlide context--
A program that illustrates uses the Point operators.prog.ccSlide context--
Class Point with non-member operators.point.hSlide context--
Definition of Point member functions and non-member operators.point.ccSlide context--
An identical program that illustrates uses the Point operators.prog.ccSlide context--

Generated: Tuesday March 26, 2013, 13:03:32