- Transition to Processing
- Primitive Operations
- Algorithms
- Variables
- Debugging in Processing
- Conditions
- Loops
- Functions
- Scope
- Compound Data
- Reference Semantics
- Refactoring
- Program Design
- Transition to Java
- Debugging in Java
- Unit Testing
- Classes - Writing your own Types
- Classes - Copying objects
- Classes - Functions inside objects
- Classes - Composition
- Classes - Array of objects
- Classes - Class holding array(s)
- Recursion - What goes on during a function call
- Recursion
- Recursion with String data
- Tail-optimized recursion
- Recursion with arrays
- Lists
- Iteration
- Custom-built ArrayList
- Recursive data structures - 1
- Recursive data structures - 2
- Searching

- Logic and Proofs
- Relations
- Mathematical Functions
- Matrices
- Binary Numbers
- Trigonomtry
- Finite State Machines
- Turing Machines
- Counting - Inclusion/Exclusion
- Graph Algorithms

- Algorithm Efficiency
- Algorithm Correctness
- Trees
- Heaps, Stack, and Queues
- Maps and Hashtables
- Graphs and Graph Algorithms
- Advanced Trees and Computability

- Command line control
- Transition to C
- Pointers
- Memory Allocation
- IO
- Number representations
- Assembly Programming
- Structs and Unions
- How memory works
- Virtual Memory

- Version Control with Git
- Inheritance and Overloading
- Generics
- Exceptions
- Lambda Expressions
- Design Patterns
- Concepts of Concurrency
- Concurrency: Object Locks
- Modern Concurrency

- System Models
- Naming and Distributed File Systems
- Synchronisation and Concurrency
- Fault Tolerance and Security
- Clusters and Grids
- Virtualisation
- Data Centers
- Mobile Computing

- Transition to Scala
- Functional Programming
- Syntax Analysis
- Name Analysis
- Type Analysis
- Transformation and Compilation
- Control Abstraction
- Implementing Data Abstraction
- Language Runtimes

- Transition to Coq
- Proof by Induction, Structured Data
- Polymorphism and Higher-Order Functions
- More Basic Tactics
- Logical Reasoning in Proof Assistants
- Inductive Propositions
- Maps
- An Imperative Programming Language
- Program Equivalence
- Hoare Logic
- Small-Step Operational Semantics
- Simply-typed Lambda Calculus

- Better understand the concept of parameter passing.
- Familiarize yourself with standard terminology -
*formal paramters*vs.*actual parameters*. - Understand the control flow and memory transactions during a function call.
- Understand the concept of
*Call Stack*.

*Formal parameter*is the name used for the variable in the function definition.*Actual parameter*is the value copied into the formal parameter during a function call.

Consider the following example:

1
2
3
4
5
6
7
8
9
10
11
12
13

public class FormalVsActual {
public static int square(int val) {
int result = val * val;
return result;
}
public static void main(String[] args) {
int c = 10;
int d = square(c);
int e = square(6);
int f = square(d/20 + e/9);
}
}

In the above example,

- Formal parameter in function
`square`

is`val`

. - Actual parameter in the function call
`square(c)`

is`c`

(10). - Actual parameter in the function call
`square(6)`

is 6. - Actual parameter in the function call
`square(d/20 + e/9)`

is`d/4 + e/9`

(100/20 + 36/9 = 9).

Before we can truly conquer recursion, itâ€™s critical to understand what happens when a method is called. Consider the following example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

public static void main(String[] args) {
int ax = 1, ay = 3;
int bx = 6, by = 5;
double d = distance(ax, ay, bx, by);
System.out.println("Distance: "+d);
}
public static double distance(int x1, int y1, int x2, int y2) {
int s1 = square(x2-x1);
int s2 = square(y2-y1);
int sumSquares = s1 + s2;
double result = Math.sqrt(sumSquares);
return result;
}
public static int square(int num) {
int answer = num * num;
return answer;
}

Method call is placed on the stack. Note that parameter is `null`

because we typically do not pass any arguments to main, at least in this unit.

`distance`

with parameters 1, 3, 6 and 5.Another entry is made for the call to `distance`

and placed on the call stack.

`distance`

calls `square`

with parameter `5`

A third entry is made for the call to `square`

and placed on the stack.

`square`

returns 25 to `distance`

Entry for `square`

is taken off the stack. `distance`

becomes the active method.

`distance`

calls `square`

with parameter `2`

A third entry is made for the call to `square`

and placed on the stack.

`square`

returns 4 to `distance`

Entry for `square`

is taken off the stack. `distance`

becomes the active method.

`distance`

calls `Math.sqrt`

with parameter `29`

A third entry is made for the call to `Math.sqrt`

and placed on the stack.

`Math.sqrt`

returns 5.38516 to `distance`

Entry for `square`

is taken off the stack. `distance`

becomes the active method.

`distance`

returns 5.38516 to `main`

Entry for `distance`

is taken off the stack. `main`

becomes the active method.

`main`

terminatesEntry for `main`

is taken off the stack. Call stack is now empty. Program has now finished execution.