Introduction-How to Write a Program with the Seven Steps
Why You Should Learn to Program
()
Programming: Plan First, Then Code
Overview of the Seven Steps
Algorithms
Stepping Through An Algorithm
()
Introduction-The First Four Steps
Step 1: Work an Example Yourself
Step 2: Write Down What You Just Did
Step 3: Generalize Your Steps
Step 4: Test Your Algorithm
Testing an Algorithm for a Numerical Sequence
()
Introduction-Examples
A Pattern of Squares
A Pattern of Squares
()
Testing a Pattern of Squares
()
Drawing a Rectangle
()
Closest Point
()
Generalizing Closest Point
()
Introduction-Review
Next Steps
Reading Code-Variables and Expressions
Why You Should Learn to Read Code
()
Declaring a Variable
Assigning a Variable
Declaring and Assigning a Variable
()
Expressions with Common Operators
Examples of Expressions
()
Reading Code-Functions
Using Functions for Abstraction
()
Anatomy of a Function
How to Evaluate a Function
Execution of Function Calls
()
Scope
Reading Code-Printing
Printing
Printing Example
()
Reading Code-Conditional Statements
Conditional Statements
If/Else
Execution of If/Else
()
Switch/Case
Execution of Switch/Case
()
Shorthand
Reading Code-Loops
Loops for Repetition
While Loops
While Loops
()
Do/While Loops
For Loops
Equivalent For and While Loops
()
Execution of Nested Loops
()
Continue and Break
Execution of Continue
()
Reading Code-Review
Higher-level Meaning
Types-Everything Is a Number
Introduction to Types
()
Converting between Decimal and Binary
Looking under the Hood
Types-Basic Data Types
Basic Data Types
char
int
float and double
Printing redux
Types and Formatted Output
()
Types-Expressions Have Types
Expressions Have Types
Type Conversion
Casting
Type Conversion
()
Overflow and Underflow
Types-"Non-numbers"
"Non-numbers"
Strings
Images
Sound and Video
Everything Is a Number
()
Types-Complex, Custom Data Types
Structs
Struct for a Rectangle
()
Typedef
Uses of Typedef
()
Enumerated Types
Enumerated Types
()
Types-Review
A Duke Software Engineering Student on the Importance of Planning
()
Project-Introduction
Importance of Writing a Specific Algorithm
()
Sample PB&J Algorithm with Feedback
Project-Assignment
Introduction to Sorting
()