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
Reference types, Value types, and Patterns

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').

The variables p1 and p2 refer to two points.point-exSlide contextText book context-
Struct Point.Point.csSlide contextText book context-
Struct Card.PlayingCard.csSlide contextText book context-
A client of struct Card.Client.csSlide contextText book context-
Fields in structs cannot have initializers.structs1.csSlide contextText book context-
An explicit parameterless constructor is not allowed.structs2.csSlide contextText book context-
Moving a point by mutation.MoveClient.csSlide contextText book context-
The struct Point - mutable, where move returns a Point.Point.csSlide contextText book context-
Application the struct Point - Cascaded moving.Client.csSlide contextText book context-
The struct Point - immutable.Point.csSlide contextText book context-
Application the struct Point - immutable.Client.csSlide contextText book context-
A program that illustrates boxing and unboxing.boxing.csSlide contextText book context-
An integer sequence with Min and Max operations - a naive attempt.intseq-naive.csSlide contextText book context-
An integer sequence with Min and Max operations - with int?.intseq.csSlide contextText book context-
A client of IntSequence.app.csSlide contextText book context-
A single class in the anonymous default namespace.ex.csSlide contextText book context-
Two namespaces and a nested namespace with classes.ex.csSlide contextText book context-
A client of classes in different namespaces.client.csSlide contextText book context-
An equivalent client of classes in different namespaces - no using clauses.client-equiv.csSlide contextText book context-
Nested namespaces with classes.ex.csSlide contextText book context-
Equivalent program with nested namespaces - no physical nesting.ex-equiv.csSlide contextText book context-
A client of classes in nested namespaces.client.csSlide contextText book context-
Part one of namespace Intro with the classes A and B.f1.csSlide contextText book context-
Part two of namespace Intro with the class C.f2.csSlide contextText book context-
A client class that uses the classes in namespace Intro.client.csSlide contextText book context-
A template of a singleton class.singleton.csSlide contextText book context-
A singleton Die class.singleton-die.csSlide contextText book context-
Application of the singleton Die class.dieApp.csSlide contextText book context-
A singleton Random class.RandomSingleton.csSlide context--
A Die class that uses singleton Random.die.csSlide context--
A Die application class.dieApp.csSlide context--
A clumsy attempt with two overloaded constructors.Point-before.csSlide contextText book context-
A better solution with static factory methods.Point-after.csSlide contextText book context-
A clumsy attempt with two overloaded constructors and an illegal constructor.Interval-before.csSlide contextText book context-
A better solution with static factory methods.Interval-after.csSlide contextText book context-
A Mutable Date class.date.csSlide contextText book contextNote context
A Person class that can return its private date of birth.person.csSlide contextText book contextNote context
A client of the Person which modifies the returned birth Date.Client.csSlide contextText book contextNote context

Generated: Monday February 7, 2011, 12:14:07