BIT 142:Intermediate Programming
Lessons

Lesson 01 Lesson 02 Lesson 03
 

DUE: Assignment 1: Hand in by Weds

 

Individual Pre-Class Exercises:
<Due: 3/31 (Friday)>

  1. Get Visual Studio
  2. Orient yourself to BIT 142
  3. Create a simple console application
    (Hand-In) (Ch 4)
  4. Basic Console I/O (Ch 4)
  5. Basic Arithmetic Operators (pg 204-210)
  6. Comparison Operators
  7. Function Calls: A Handy Trick
  8. Data Types (Hand-In) (Ch 7)
  9. Order Of Operations (Hand-In) (Ch 7)
  10. Console I/O, Operators (Hand-In)
     
  11. How to hand in pre-class exercises
    and homework

Individual Pre-Class Exercises:
<Due: 4/3 (Monday)>

  1. C# Intro: Namespaces
  2. Integer vs. real division (Hand-In)
  3. Modulus operator ( % ) (Hand-In)
  4. Fahrenheit to Celsius (Hand-In)
  5. Logical operators (Ch 8 - pg 292+)
  6. String Basics (Ch 7 - pg 242+) (Hand-In)
  7. Comparing Strings (Ch 7 - pg 242+)
  8. if ; if ...else  ; switch statements
    (Ch 8) (Hand-In)
  9. Simple while loops (Ch 9)
  10. Sentinel-controlled loops: (Hand-In)
    Averaging numbers
    (Ch 9)
  11. Nested Loops: Intro (Ch 9)
  12. Nested Loops: Rectangles
    (Ch 9 - pg 355) (Hand-In)
  13. Nested Loops: Hollow Rectangles (Ch 9)
  14. Nested Loops: Triangles (Ch 9)
  15. Printing A Range Of Numbers
    (Ch 9) (Hand-In)
GROUP WORK: Lesson 03 Code Samples

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

  1. Single-file Demo for PCE's
    (You need to do this, and use this
    as the 'template' for the other exercises
    )
  2. Built-in Math functions
  3. Defining & Using an Instance Method
    (Excercise #3 was done in-class on 4/5)
  4. Basic Parameters
  5. Return Values
  6. Printing numbers, w/ params
  7. Generating Random Numbers (Hand-In)
  8. Detecting Prime Numbers (Hand-In)
  9. Reference Parameters (Hand-In)
  10. Arrays: Basics
  11. Arrays: Usage
  12. Arrays: Using only part of the array (Hand-In)
  13. Fibonacci numbers in an array (Hand-In)
  14. Strings - array-like syntax

In-Class Exercises:
<Class Date: 3/27>

  1. Create a simple console application
  2. Basic Console I/O
  3. Defining & Using a Static Method
  4. Static Variables as 'class global variables'
  5. How to hand in pre-class exercises
    and homework
In-Class Exercises:
<Class Date: 4/5>
  1. Basic Exception Handling
  2. Defining & Using an Instance Method
  3. Using the modulus operator
  4. Nested Loops: Multiplication Table
    (Not done ; you should be able to do this,
    but aren't required to code this up)
  5. Group work guide:
    Efficiency, Correctness, Testability
In-Class Exercises:
<Class Date: 4/12>
  1. Design: return values vs. out
                     vs. ref parameters
  2. Review of classes & instances
  3. Classes with instance data
  4. Access Control (public, private)
  5. String Allocation Rules
    HowManyStrings.cs.txt
    String Allocation Practice -ANSWERS
  6. Optimization: StringBuilder (optional)
    DEMO: StringBuilder: First Try
  7. Single-file Demo for PCE's
  8. Multidimensional Arrays
    DEMO: MultiDim Arrays
                              
    (How to access demos)
Instructor's Materials:
Notes
Slides


Slides (Lecture #2)
Instructor's Materials:
Notes
Slides
Instructor's Materials:
Notes
Slides

 

Lesson 04 Lesson 05 Lesson 06

Assignment 2(Due Weds, April 19)

 

Assignment 3 (Due Weds, May 3rd)

NO GROUP WORK

for lesson 04

GROUP WORK:  L05

GROUP WORK: L06

Individual Pre-Class Exercises:
<Due: 4/17>
  1. String Allocation Rules
    HowManyStrings.cs.txt
    String Allocation Practice -ANSWERS
  2. Passing arrays to functions
  3. Review of classes & instances
  4. Instance Variables
  5. Access Control (public, private) (Hand-In)
    (these first four are identical to what was
    done in-class on 4/12)
  6. Variable Scope (class, instance, local/param vars)
  7. Overloading: Basics (Hand-In)
  8. Overloading: Create your own
  9. Constructors (Hand-In)
  10. C# Properties (Hand-In)
  11. Read-only Properties
  12. Indexers: Simulating an Array
  13. Object Composition (Hand-In)
Individual Pre-Class Exercises:
<Due: 4/24>
  1. Overlap method (Hand-In)
  2. Indexers: Simulating an Array (Hand-In)
  3. Indexers: Crude Hash Table
  4. Indexers: Funky, Nontrad use: Fib No.s
  5. Inheritance: Basic Example (Hand-In)
  6. Inheritance: Constructors
  7. Inheritance: Calling Methods in the base class
  8. Inheritance: Abstract base class
  9. (Non)Inheritance: Array of objects (Hand-In)
  10. Inheritance: Polymorphism, manually (Hand-In)

Individual Pre-Class Exercises:
<Due: 5/1>

  1. Basic Exception Handling  (Hand-In)
  2. EH: Centralized Error Handling (Hand-In)
  3. EH: Multiple trys;  finally (Hand-In)
  4. EH: Throwing an exception
  5. Basic Polymorphism (Hand-In)
  6. Polymorphism: virtual, override, new (Read In Detail)
    File: Inheritance.zip

 

 

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

  1. Designing a class: Circle
  2. Testing a class: Circle
  3. Composing a class
  4. Interaction between classes
  5. Network of objects
  6. Overlap method (Optional)
  7. Preview: Inheritance: 3D Point class
  8. Jagged Arrays: Tracking Grades
    Demo: Jagged Arrays (Upper-Tri Matrix)
  9. Jagged Arrays: Counting Arrays
In-Class Exercises:
<Class Date: 4/26>
  1. Create a class to be stored
  2. ArrayList: Usage, overloading, indexers
  3. Student-Defined ArrayList
  4. Polymorphism Preview
  5. Polymorphism: ToString
  6. Polymorphism: Ctor, base class ctor
  7. Inheritance: Program Design
In-Class Exercises:
<Class Date: 5/3>
  1. Midterm Exam: Q+A & Review
  2. EH: Centralized handling across
    multiple methods
  3. Polymorphism: ToString Example
  4. Polymorphism: ToString
  5. Polymorphism: Program Design
  6. Preview: Recursion By hand: Warm-up
  7. Recursion By hand: More Complicated
  8. Interfaces: IComparable (time permitting)
Instructor's Materials:
Notes
Slides
 
Instructor's Materials:
Notes
Slides
 
Instructor's Materials:
Slides
 

 

Lesson 07 Lesson 08 Lesson 09

 

Assignment 4 (Due Wednesday May 17)

DUE: Assignment 5 (Due Wednesday May 24

GROUP WORK:  L07 GROUP WORK: L08 GROUP WORK: L09
Individual Pre-Class Exercises:
<Due: 5/8>
  1. Review for the exam

Individual Pre-Class Exercises:
<Due: 5/15>
  1. Basic (Crashing) Recursion
  2. Basic Recursion (Hand-In)
  3. What does this code print?
    Parameters, Return values
  4. What does this code print? (Required)
    Parameters, Return, multiple calls
Individual Pre-Class Exercises:
<Due: 5/22>
  1. Recursive Power Function
  2. Recursive Multiplication (Hand-In)
  3. Fibonacci Numbers (And Arrays!) (Hand-In)
    Previews:
  4. Write Factorial (Hand-In)
  5. Recursively Printing Even Numbers (Hand-In)
  6. Sorting & Searching: setup for the class

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

  1. <Midterm Exam>
In-Class Exercises:
<Class Date: 5/17>
  1. Review: Recursion By hand: Warm-up
  2. Recursion By hand: More Complicated
  3. Recursive Power Function
  4. Recursive Multiplication
  5. Fibonacci Numbers (And Arrays!)
    Previews:
  6. Bubble Sort By Hand
  7. Binary Search By Hand

  8. Selection Sort (Algorithm, and by hand)

In-Class Exercises:
<Class Date: 5/24>
  1. < Recursion Review >

  2. Linear Search By Hand

  3. Binary Search By Hand

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

  6. Using .Net's Array.Sort, Array.Search

Instructor's Materials:
Notes
Slides
Instructor's Materials:
Notes
Slides   
Instructor's Materials:
Notes

Slides   

 

Lesson 10 Lesson 11
GROUP WORK:  L10 GROUP WORK:  L11
Individual Pre-Class Exercises:
<Due: 5/29>
  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)
  6. BubbleSort
  7. BubbleSort: 
    Measuring Performance (Hand-In)
  8. Analyzing the different algorithms (Hand-In)

Individual Pre-Class Exercises:
<Due: 6/5>

  1. Review for the exam

In-Class Exercises:
<Class Date: 5/31>
  1. < Algorithms Review >
    Runtimes.xls
     
  2. Final Exam: Q+A & Review
     
  3. String Allocation Rules (repost)

  4. Name Game: Analyzing String Creation
    Name Game Project (VS 2003)
     

  5. StringBuilder class (optional)
    Example File
     

  6. Bitwise Ops: BitPrinter

  7. Bitwise Ops: GetBit, SetBit
  8. Bitwise Ops: SetOrClearBit

ON 5/31, AT THE BEGINNING OF THE LECTURE,
ALL HOMEWORKS
(AND REVISIONS TO HOMEWORKS)  MUST BE HANDED IN,
 

with the following, single exception:

You are allowed to hand in either 1 homework assignment's initial version, or else 1 revision to a homework assignment. 

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

  1. <Final Exam>

 

Instructor's Materials:
Notes
Slides
Instructor's Materials:
Slides
Unused Lecture Material

Back to BIT 142's homepage