Outline Ch1
Outline Ch1
Outline Ch1
Front Matter
I. Table of Contents
2. Preface
1. Why Interactive Programming?
2. Ramifications for Later Curriculum
3. A Short History of the Rethinking CS101 Project
1. Research Roots
2. Classroom Experience
4. How to Use This Book
1. Part By Part
2. Pedagogical Elements and Supplementary Materials
5. About the Author
6. Acknowledgements
3. List of Figures
4. List of Tables
5. List of Sidebars
1. Java Sidebars
2. Style Sidebars
Chapter Overview
Chapter Summary
Exercises
Chapter Overview
1. The Problem
1. Problem Requirements
1. Assumptions
2. Promises/Guarantees
2. The Community Around You
1. Program Libraries
2. Users
3. Physical Environment
4. Understand their interfaces (and assumptions)
3. Requirements are a Moving Target
1. Software Lifecycle
2. Documenting your Design
2. Designing a solution
1. Who are the members?
2. How do they Interact
1. What Promises?
2. What Assumptions?
3. Who does what?
3. What goes inside?
4. Nouns and Verbs
5. Acting it out
3. The process
1. Keep it simple
2. Keep it working
3. You'll still have to debug (debugging is normal)
1. When it's not working
2. make state manifest
3. Explain it to someone
4. Act it out
4. Documentation
Chapter Summary
Exercises
Overview
4. Summary
Suggested Exercises
Chapter Overview
1. Things
1. Primitive Things and Literals
1. Numbers
2. Characters and Strings
3. Booleans
2. Objects
2. Naming Things
1. Referring to Things
2. Assignment
3. Types
1. Declarations and The type-of-thing name-of-thing Rule
2. Definition = Declaration + Assignment
3. Primitive Types
4. Object Types
4. Types of Names
1. Shoebox Names
2. Label Names
Chapter Summary
Exercises
Chapter Overview
Chapter Summary
Exercises
Chapter Overview
1. Simple Expressions
1. Literals
2. Names
2. Method Invocation
3. Combining Expressions
4. Assignments and Side-Effecting Expressions
5. Other Expressions that Use Objects
1. Field Access
2. Instance Creation
3. Type Membership
http://www.cs101.org/ipij/outline.html 09/18/2003 11:39:08 AM
IPIJ: Chapter Outlines Page 6
Chapter Summary
Exercises
Chapter Overview
Chapter Summary
Exercises
Overview
1. The Problem
2. Representation
3. Interacting with the Rules
4. Paying Attention to the World
5. Fancy Dot Tricks
6. Remembering State
1. Fields
2. Fields vs. Variables
7. Summary
Suggested Exercises
Chapter Overview
3. Scoping of Fields
4. Comparison of Kinds of Names
2. Static Members
4. Methods
1. Method Declaration
2. Method Body and Behavior
3. A Method ALWAYS Belongs to an Object
1. this.
2. Static Methods
4. Method Overloading
5. Constructors
1. Constructors are Not Methods
2. Syntax
3. Execution Sequence
4. Multiple Constructors and the Implicit No-Arg Constructor
5. Constructor Functions
Chapter Summary
Exercises
Chapter Overview
1. Object-Oriented Design
Chapter Summary
Exercises
Overview
Objectives
1. Exercises
Chapter Overview
1. Animate Objects
2. Animacies are Execution Sequences
3. Being Animate-able
1. Implementing Animate
2. AnimatorThread
3. Creating the AnimatorThread in the Constructor
4. A Generic AnimateObject
4. More Details
1. AnimatorThread Details
2. Delayed Start and the init() Trick
3. Threads and Runnables
5. Where do Threads come from?
1. Starting a Program
2. Why Constructors Need to Return
Chapter Summary
Exercises
Chapter Overview
1. Derived Factories
1. Simple Inheritance
2. java.lang.Object
3. Superclass Membership
2. Overriding
1. super.
2. The Outside-In Rule
3. Problems with Private
3. Constructors are Recipes
1. this()
2. super()
3. Implicit super()
4. Interface Inheritance
5. Relationships Between Types
1. Chapter Summary
Exercises
Objectives
Overview
Suggested Exercises
Chapter Overview
1. Exceptional Events
1. When Things Go Wrong
2. Expecting the Unexpected
3. What's Important to Record
2. Throwing an Exception
3. Catching an Exception
4. Throw vs. Return
5. Designing Good Test Cases
1. Chapter Summary
Exercises
Chapter Overview
1. Conditional Behavior
2. If and else
1. Basic Form
2. Else
3. Cascaded Ifs
4. Many Alternatives
3. Limited Options: Switch
1. Constant Values
1. Symbolic Constants
2. Using Constants
2. Syntax
1. Basic Form
2. The Default Case
3. Variations
4. Switch Statement Pros and Cons
4. Arrays
1. What is an Array?
1. Array Declaration
2. Array Construction
3. Array Elements
2. Manipulating Arrays
1. Stepping Through an Array Using a For Statement
2. Using Arrays for Dispatch
5. When to Use Which Construct
1. Chapter Summary
Exercises
Chapter Overview
1. Chapter Summary
Exercises
Chapter Overview
2. Procedural Encapsulation
3. Variations
4. Pushing Methods Into Objects
5. What Happens to the Central Loop?
3. The Use of Interfaces
4. Runnables as First Class Procedures
5. Callbacks
6. Recursion
1. Structural Recursion
1. A Recursive Class Definition
2. Methods and Recursive Structure
3. The Power of Recursive Structure
2. Functional Recursion
Chapter Summary
Exercises
Chapter Overview
Chapter Summary
Exercises
Objectives
Overview
Suggested Exercises
Chapter Overview
Sidebar: cs101.awt.DefaultFrame
1. Chapter Summary
Exercises
Objectives
Overview
Suggested Exercises
Chapter Overview
1. State Machines
2. State Spaces
3. Organizational Behavior
4. Network Models
5. Patterns
6. UML
7. Metrics
1. Static Complexity
2. Throughput and Latency
1. Chapter Summary
Exercises
Chapter Overview
1. Pacing
2. Procedure Calls
3. Callbacks
4. Explicit Communication Channel Objects
5. Protocols
Chapter Summary
Exercises
Chapter Overview
Chapter Summary
Exercises
Objectives
Overview
Suggested Exercises
Chapter Overview
Chapter Summary
Exercises
Chapter Overview
Chapter Summary
Exercises
Objectives
Overview
Suggested Exercises
Chapter Overview
1. Server Architechtures
1. Dumb broadcast server
2. Routing server
3. DNS
2. RPC
3. Peer Architectures
1. Ring
2. Round Robin
3. Cubes
4. Arbitration
5. Blackboard
6. Tuple-space
Chapter Summary
Exercises
Appendices
1. Applets
2. AWT Quick Reference
1. AWT Components
2. Component
3. Canvas
4. Widgets and their Event Types
5. Basic Widgets
6. ItemSelectable Widgets
7. Text Widgets
8. Container
9. Panel and Frame
10. Dimension, Point, and Rectangle
11. Graphics
12. AWT Events
13. ActionEvent and ActionListener
14. AWT Listeners and Adapters
3. IO Quick Reference
1. InputStream and Reader
2. OutputStream and Writer
3. Sources of Streams
4. InputStreamReader and OutputStreamWriter
5. Files
6. Pipes
7. Streams that Add Features
8. Buffering
9. Primitive Data
10. Object Streams and Serialization
11. Other Useful Streams
12. IOExceptions
4. Java Charts
1. About Java Charts
2. Program File
3. Class Declaration
4. Field Declaration
5. Method Declaration
6. Expression
7. Statement
8. Disclaimers, Notes, Amendments, etc.
5. Glossary
6. Indices
1. Syntax Sidebars
2. Style Sidebars
3. Interludes
4. Case Studies
5. Terms
This chapter is excerpted from a draft of Introduction to Interactive Programming In Java, a forthcoming
textbook. It is a part of the course materials developed as a part of Lynn Andrea Stein's Rethinking CS101
Project at the Computers and Cognition Laboratory of the Franklin W. Olin College of Engineering and
formerly at the MIT AI Lab and the Department of Electrical Engineering and Computer Science at the
Massachusetts Institute of Technology.
Questions or comments:
<webmaster@cs101.org>