BIT 142:Intermediate Programming (2006 Fall)
Lessons

Table of Contents
Lesson 01 Lesson 02 Lesson 03 Lesson 04
Lesson 05 Lesson 06 Lesson 07 Lesson 08
Lesson 09 Lesson 10 Lesson 11 Misc. / Unused

 

Lesson 01
 
Individual Pre-Class Exercises:
<Due: 9/29 (Friday)>
  1. Get Visual Studio
  2. Orient yourself to BIT 142
  3. Create a simple console application  (Hand-In) (Ch 3.3 (walkthrough), 3.2 (explanation of the program) )   Demo Video
  4. Basic Console I/O     (Sect. 3.5)
  5. Basic Arithmetic Operators (Sect. 3.6, 3.8)
  6. Comparison Operators (Sect. 3.9)
  7. Defining & Using an Instance Method (Sect. 4.1-4.3 (mostly 4.3))
  8. Single-file Demo for PCE's (Sect. 4.1-4.3 (mostly 4.3)) (You need to do this, and use this as the 'template' for the exercises you do after this point)
  9. Function Calls: A Handy Trick (on your own)
  10. Data Types (Hand-In) (Sect. 5.11, Appendix L)
  11. Order Of Operations (Hand-In) (End of Sect. 3.9, Appendix A)
  12. Console I/O, Operators (Hand-In) (previous readings)
  13. String Basics (Sect. 16.2) (Hand-In)
  14. Comparing Strings (Sect. 16.5)
     
  15. How to hand in pre-class exercises and homework
In-Class Exercises:
<Class Date: 9/25>

Review:

  1. Create a simple console application (Ch 3.3 (walkthrough), 3.2 (explanation of the program) )  Demo Video
  2. How to hand in pre-class exercises and homework
  3. Defining & Using an Instance Method
  4. Single-file Demo for PCE's (Sect. 4.1-4.3 (mostly 4.3)) (You need to do this, and use this as the 'template' for the exercises you do after this point)
  5. Basic Console I/O

Preview:

  1. Different types of loops
  2. nested loops
  3. % operator
  4. integer division
Instructor's Materials:
Notes
Slides (for the first day)


Slides (Lecture #2)

 

Lesson 02

 

Individual Pre-Class Exercises:
<Due: 10/2 (Monday)>
  1. C# Intro: Namespaces
  2. Integer vs. real division (End of Sect. 5.6, also Sect. 3.8) (Hand-In) (Demo Video   VS Project Used in the Video)
  3. Modulus operator ( % ) (Section 3.8) (Hand-In)    (Demo Video)
  4. Fahrenheit to Celsius (Based on your previously acquired knowledge) (Hand-In)
     
  5. Logical operators (Section 6.8)
  6. if ; if ...else  ; switch statements (If: Sect. 5.3 / If...Else: Sect. 5.4) (Hand-In)
  7. Simple loops - while, for -(Sect. 5.5)
     
  8. Compound Assignment operators (Section 5.9), Increment / Decrement operators (Sect. 5.10)
  9. keywords: break / continue (Section 6.7)
     
  10. Sentinel-controlled loops: Averaging numbers (Sect. 5.7) (Hand-In)
  11. Nested Loops: Rectangles  (Sect. 5.8) (Hand-In (Demo Video   VS Project Used in the Video)
  12. Nested Loops: Hollow Rectangles (Sect. 5.8) (Hand-In)
  13. Printing A Range Of Numbers (Previously acquired knowledge) (Hand-In)
In-Class Exercises:
<Class Date: 10/2>

Review Topics:

  1. Remainder ('Modulus') operator
  2. Integer division
  3. Nested Loops: Multiplication Table

Preview Topics:

  1. Group work guide: Efficiency, Correctness, Testability
  2. Random # basics   Demo File
  3. Random numbers, manually bounded
  4. Reference Parameters

Warning: Don't worry about the recursion section (Sect. 7.13) - we'll see that in more detail later on

Instructor's Materials:
Notes
Slides

 

Lesson 03

DUE: Assignment 1 (Due Mon, Oct. 9th)

GROUP WORK: Lesson 03 Code Samples

Individual Pre-Class Exercises:
<Due: 10/9 (Monday)>

  1. Nested Loops: Rectangle of Numbers (Sect. 5.8)  (for more nested-loop review)
  2. Nested Loops: Triangle of Numbers (Sect. 5.8) (Hand-In) for 2007 Winter term
     
  3. Built-in Math functions  (Hand-In (Sect. 7.3)
     
  4. Basic Parameters (Sect. 4.4)
  5. Return Values (Previous Knowledge)
  6. Printing numbers, w/ params (Sect. 4.4)
  7. Design: return values vs. out vs. ref parameters (Sect. 7.14) (Hand-In)
    For this PCE, you are encouraged to discuss this with your group.  Also, there may be multiple, valid interpretations of what a correct answer is for this exercise - you should focus on being able to clearly explain a reasonable rationale for your choices.
     
  8. Overloading: Basics (Sect. 7.12) (Hand-In) (Demo Video   VS Project Used in the Video)
  9. Overloading: Create your own (Sect. 7.12)
     
  10. Generating Random Numbers (Sect. 7.9 (Shift/scale: 7.9.1)) (Hand-In)
     
  11. Detecting Prime Numbers (Previous Knowledge) (Hand-In)
In-Class Exercises:
<Class Date: 10/9>

Review:

  1. Design: return values vs. out vs. ref parameters

Preview:

  1. Arrays: Basics (Sect. 8.1, 8.2)
  2. Arrays: Tracking grades in an array
     
  3. EXTRA TOPIC: Multidimensional Arrays (Sect. 8.10)
    DEMO: MultiDim Arrays (How to access demos)
     
  4. Basic OOP - objects & instance vars.
  5. Review of classes & instances
  6. Classes with instance data
  7. Access Control (public, private)
Instructor's Materials:
Notes
Slides

 

Lesson 04

DUE: Assignment 2 (Due Mon, Oct 23rd)

GROUP WORK: None for Lesson 04
(Points will be given for in-class participation in lesson 04, instead)

Individual Pre-Class Exercises:
<Due: 10/16>
  1. Arrays: Basics (Sect. 8.1, 8.2)
  2. Arrays: Usage (Sect. 8.3)
  3. Arrays: Using only part of the array (Hand-In)
  4. Fibonacci numbers in an array (Hand-In)
     
  5. Passing arrays to functions (Sect. 8.7, 8.8)
     
  6. Classes & instances (Sect. 9.2) CAP
  7. Instance Variables (Sect. 4.2+)
  8. Access Control (public, private) (Sect. 9.3) (Hand-In)
  9. Variable Scope (class, instance, local/param vars) (Sect. 7.11)
  10. Constructors (Hand-In) (Sect 4.9)
  11. C# Properties (Hand-In) (Sect 4.9)
  12. Read-only Properties
  13. Using The Distance Formula (Demo Video   Word Document Used in the Video)
    (There is nothing to hand in for this PCE.  Personally, I'd recommend doing a couple of examples by hand in order to make sure that you understand the formula.  You will be using the formula on your homework assignments, etc.)
     
  14. Mixing Arrays and Classes (Previous Knowledge)  (Hand-In)  (Demo Video     Starter Project)

In-Class Exercises:
<Class Date: 10/16>

Review:
  1. Designing a class: Circle
  2. Testing a class: Circle

Preview:

  1. Composing a class
     
  2. Interaction between classes
  3. Overlap method
  4. Network of objects (Optional)
     
  5. Preview: Inheritance: 3D Point class
    Warning: The book mostly has a case study for the Inheritance aspects of OOP: you may need to supplement w/ help around more specific topics
     
  6. Jagged Arrays: Tracking Grades
    Demo: Jagged Arrays (Upper-Tri Matrix)
  7. Jagged Arrays: Counting Arrays
Instructor's Materials:
Notes
Slides
 

 

Lesson 05

 

GROUP WORK:  L05

Individual Pre-Class Exercises:
<Due: 10/23>
  1. Object Composition (Hand-In (Sect. 9.8)
  2. Overlap method (Hand-In) (Previous Knowledge)
     
  3. Inheritance: Basic Example (Chapter 10: Inheritance) (Hand-In)
  4. Inheritance: Constructors
  5. Inheritance: Calling Methods in the base class
  6. Inheritance: Abstract base class
  7. (Non)Inheritance: Array of objects (Hand-In)
     
  8. Strings - array-like syntax (Sect. 16.4)
  9. Indexers: Simulating an Array (Sect. 9.5) (Hand-In)
  10. Indexers: Crude Hash Table (Sect. 9.5)
  11. Indexers: Funky, Nontrad use: Fib No.s (Sect. 9.5)
In-Class Exercises:
<Class Date: 10/23>

Review:

  1. Object composition
  2. Indexers

Preview:

  1. Inheritance: Basic Example (Chapter 10: Inheritance)
  2. Inheritance: Constructors
  3. Inheritance: Calling Methods in the base class
  4. Inheritance: Abstract base class
Instructor's Materials:
Notes
Slides
 

 

Lesson 06

Assignment 3 (Due Wednesday, Nov 1st)

GROUP WORK: L06

Individual Pre-Class Exercises:
<Due: 10/30>

  1. Inheritance: Basic Example (Chapter 10: Inheritance) (Hand-In)
  2. Inheritance: Constructors
  3. Inheritance: Calling Methods in the base class
  4. Inheritance: Abstract base class
  5. (Non)Inheritance: Array of objects (Hand-In)
  6. Inheritance: Polymorphism, manually (Chapter 11: Polymorphism) (Hand-In)
  7. Basic Polymorphism (do this as best as you can)
In-Class Exercises:
<Class Date: 10/30>

Review:

  1. Midterm Exam: Q+A & Review
     
  2. Inheritance

Preview:

  1. Polymorphism: ToString Example
  2. Polymorphism: ToString
     
  3. Basic Exception Handling  (Sect 12.2, 12.3, 12.4)
  4. EH: Centralized Error Handling
Instructor's Materials:
Slides
 

 

Lesson 07

 

GROUP WORK:  L07
Individual Pre-Class Exercises:
<Due: 11/6>
  1. Review for the exam
     

  2. Polymorphism Preview
  3. Polymorphism: ToString
  4. Polymorphism: Ctor, base class ctor
     
  5. Basic Polymorphism (Hand-In)

In-Class Exercises:
<Class Date: 11/6>

  1. <Midterm Exam>
     
  2. Recursion By hand: Warm-up #1
  3. Recursion By hand: Warm-up #2

 

Instructor's Materials:
Notes
Slides

 

Lesson 08

Assignment 4 (Due Monday, Nov 13th )

GROUP WORK: L08
Individual Pre-Class Exercises:
<Due: 11/13>
  1. What does this code print? (Hand-In)
     
  2. Recursion By hand: Warm-up #1
  3. Recursion By hand: Warm-up #2 (Hand-In)
  4. Recursion By hand: Warm-up #3 (Hand-In)
     
  5. Basic (Crashing) Recursion (Sect. 7.13)
  6. Basic Recursion (Sect. 7.13) (Hand-In) CAP
In-Class Exercises:
<Class Date: 11/13>

Review:

  1. Recursion By hand: Warm-up
  2. Recursion By hand: More Complicated

Previews:

  1. Recursive Power Function
  2. Recursive Multiplication
  3. Fibonacci Numbers (And Arrays!)
Instructor's Materials:
Notes
Slides   

 

Lesson 09

DUE: Assignment 5 ( Due Weds, Nov 29

GROUP WORK: L09
Individual Pre-Class Exercises:
<Due: 11/20>
  1. Basic Exception Handling  (Sect 12.2, 12.3, 12.4) (Hand-In)
     
  2. Recursively Printing Even Numbers
  3. Recursive Power Function (Hand-In)
  4. Recursive Multiplication
  5. Write Factorial (Hand-In)
  6. Fibonacci Numbers (And Arrays!) (Hand-In)
     
  7. Sorting & Searching: setup for the class (Hand-In)
In-Class Exercises:
<Class Date: 11/20>

Review:

  1. Recursion

Preview:

  1. Linear Search By Hand

  2. Binary Search By Hand

  3. Bubble Sort By Hand
  4. Selection Sort (Algorithm, and by hand)

Instructor's Materials:
Notes

Slides   

 

Lesson 10
Individual Pre-Class Exercises:
<Due: 11/27>
  1. Linear Search
  2. Binary Search
  3. Write recursive binary search
  4. Linear Search: Measuring Performance (Hand-In)
  5. Binary Search: Measuring Performance (Hand-In) (This doesn't have to be recursive)
  6. BubbleSort
  7. BubbleSort: Measuring Performance (Hand-In)
  8. Analyzing the different algorithms (Hand-In) CAP
In-Class Exercises:
<Class Date: 11/27>

<Class canceled due to unexpected snow>

Review:

  1. Final Exam: Q+A & Review

Preview:

  1. < Algorithms Review >
    Runtimes.xls
     
  2. Big "Oh" Notation
     
  3. Using .Net's Array.Sort, Array.Search

Instructor's Materials:
Notes
Slides

 

Lesson 11

Individual Pre-Class Exercises:
<Due: 12/4>

  1. Review for the exam

In-Class Exercises:
<Class Date: 12/4>

  1. <Final Exam>

 

Instructor's Materials:
Slides

Back to BIT 142's homepage

Unused Lecture Material

BIT 143's Lessons Page