BIT 142:Intermediate Programming

Lessons

Exercises that are still in 'draft' status will be marked with yellow highlight.
Exercises that have been changed after being posted to an active lesson will be marked with light blue highlight.
Exercises that have been changed after being posted to an active lesson will be marked with light green highlight if you do NOT need to adhere to the changes (in other words, your Prof is fixing stuff for the next time the course will be run, and so the changes are for future students, not y'all current students)

Lesson 01:Active Lesson 02: Active Lesson 03: Active
 

Assignment 1: Hand In If Finished

DUE: Assignment 1

Individual Pre-Class Exercises:
<Due: 1/6 (Friday)>

  1. Get Visual Studio
  2. Orient yourself to BIT 142
  3. Create a simple console application (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 (Ch 7)
  9. Order Of Operations (Ch 7)
  10. Console I/O, Operators
  11. How to hand in pre-class exercises
    and homework

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

  1. C# Intro: Namespaces
  2. Integer vs. real division
  3. Modulus operator ( % )
  4. Fahrenheit to Celsius
  5. Logical operators (Ch 8 - pg 292+)
  6. String Basics (Ch 7 - pg 242+)

  7. Comparing Strings (Ch 7 - pg 242+)
  8. if ; if ...else  ; switch statements (Ch 8)
  9. Simple while loops (Ch 9)
  10. Sentinel-controlled loops:
    Averaging numbers
    (Ch 9)
  11. Nested Loops: Intro (Ch 9)
  12. Nested Loops: Rectangles (Ch 9 - pg 355)
  13. Nested Loops: Hollow Rectangles (Ch 9)
  14. Nested Loops: Triangles (Ch 9)
  15. Printing A Range Of Numbers (Ch 9)

Individual Pre-Class Exercises:
<Due: 1/16 (Monday)>

  1. Single-file Demo for PCE's

  2. Built-in Math functions

  3. Defining & Using an Instance Method
  4. Basic Parameters

  5. Return Values

  6. Printing numbers, w/ params

  7. Generating Random Numbers

  8. Detecting Prime Numbers

  9. Reference Parameters

  10. Arrays: Basics

  11. Arrays: Usage

  12. Arrays: Using only part of the array

  13. Fibonacci numbers in an array

GROUP WORK: Lesson 03 Code Samples

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

  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: 1/11>
  1. Floating point vs. integer division
  2. Using the modulus operator
  3. Nested Loops: Multiplication Table
  4. Defining & Using an Instance Method
  5. Group work guide:
    Efficiency, Correctness, Testability
In-Class Exercises:
<Class Date: 1/18>
  1. Design: return values vs. out vs. ref parameters
  2. Passing arrays to functions (optional)
  3. Optimization: String efficiency
    DEMO: How Many Strings?
                                                      (How to access demos)
  4. Optimization: StringBuilder (optional)
    DEMO: StringBuilder: First Try
  5. Program Design with functions (optional)
Instructor's Materials:
Notes
Slides
Instructor's Materials:
Notes
Slides
Instructor's Materials:
Notes
Slides

 

Lesson 04: Active Lesson 05 Lesson 06

DUE: Assignment 2

 

DUE: Assignment 3

Individual Pre-Class Exercises:
<Due: 1/23>
  1. Passing arrays to functions
  2. Review of classes & instances
  3. Instance Variables
  4. Variable Scope
    (class, instance, local/param vars)
  5. Access Control (public, private)
  6. Constructors
  7. C# Properties
  8. Object Composition
  9. Composition (LineSegment class)
  10. Composition (Optional & More Challenging)
Individual Pre-Class Exercises:
<Due: 1/30>
  1. Indexers: Simulating an Array (Required)
  2. Indexers: Crude Hash Table
  3. Indexers: Funky, Nontrad use: Fib No.s
  4. Inheritance: Basic Example (Required)
  5. Inheritance: Constructors
  6. Inheritance: Calling Methods in the base class
  7. Inheritance: Abstract base class
  8. Overloading: Basics
  9. Overloading: Create your own
  10. (Non)Inheritance: Array of objects (Required)
  11. Inheritance: Polymorphism, manually (Required)

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

 

  1. Review for the exam

 

GROUP WORK: None for L04

GROUP WORK: None for L05

GROUP WORK: None for L06

In-Class Exercises:
<Class Date: 1/25>

  1. Designing a class: Circle

  2. Testing a class: Circle

  3. Composing a class

  4. Interaction between classes

  5. REVIEW: Overlap method

  6. Network of objects

  7. Multidimensional Arrays
    DEMO: MultiDim Arrays
  8. Jagged Arrays: Tracking Grades
    Demo: Jagged Arrays (Upper-Tri Matrix)
  9. Jagged Arrays: Counting Arrays 
In-Class Exercises:
<Class Date: 2/1>
  1. ArrayList: Usage, overloading, indexers
  2. Inheritance: Program Design
  3. Student-Defined ArrayList
  4. Polymorphism Preview
  5. Polymorphism: ToString
  6. Polymorphism: Ctor, base class ctor
In-Class Exercises:
<Class Date: 2/8>
  1. <Midterm Exam>
Instructor's Materials:
Notes
Slides
 
Instructor's Materials:
Notes
Slides
 
Instructor's Materials:
Slides
 

 

Lesson 07 Lesson 08 Lesson 09

DUE: Assignment 4

 

DUE: Assignment 5 (Fri)

Individual Pre-Class Exercises:
<Due: 2/13>
  1. Basic Exception Handling  (Required)
  2. EH: Centralized Error Handling (Required)
  3. EH: Multiple trys;  finally (Required)
  4. EH: Throwing an exception
  5. Basic Polymorphism (Required)
  6. Polymorphism: virtual, override, new (Required)
    File: Inheritance.zip
Individual Pre-Class Exercises:
<Due: 2/20>
  1. Basic (Crashing) Recursion
  2. Basic Recursion (Required)
  3. What does this code print?
    Parameters, Return values
  4. What does this code print? (Required)
    Parameters, Return, multiple calls
  5. Recursively Printing Even Numbers (Required)
  6. Write Factorial (Required)
  7. Write recursive binary search
Individual Pre-Class Exercises:
<Due: 2/27>
  1. Sorting & Searching: setup for the class

  2. Linear Search

  3. Binary Search

  4. Linear Search:
    Measuring Performance
    (Required)

  5. Binary Search:
    Measuring Performance
    (Required)

  6. BubbleSort

  7. BubbleSort: 
    Measuring Performance
    (Required)

  8. Analyzing the different algorithms (Required)
GROUP WORK: None for L08 GROUP WORK: None for L08 GROUP WORK: None for L09

In-Class Exercises:
<Class Date: 2/15>

  1. Interfaces: IComparable
  2. Polymorphism: Program Design
  3. EH: Centralized handling across
    multiple methods
  4. C# Destructors
  5. Preview: Recursion By hand: Warm-up
  6. Recursion By hand: More Complicated
In-Class Exercises:
<Class Date: 2/22>
  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. Linear Search By Hand
  7. Bubble Sort By Hand
  8. Binary Search By Hand

  9. Selection Sort (Algorithm, and by hand)

In-Class Exercises:
<Class Date: 3/1>
  1. Linear Search By Hand

  2. Binary Search By Hand

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

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

  6. String Name Game

  7. Memory allocation: strings

  8. StringBuilder class
    Example File
     

  9. Bitwise Ops: Converting to base-2

  10. Bitwise Ops: BitPrinter

  11. Bitwise Ops: GetBit, SetBit

  12. Bitwise Ops: SetOrClearBit

Runtimes.xls

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

Slides   

 

Lesson 10 Lesson 11 Unused: Always Inactive :)
    X ML:

Misc:

Multithreading:

  1. Multithreading: Basics
  2. MT: Finding uses
  3. MT: Background reading
  4. MT: Mutex
  5. MT: Monitor
  6. Multithreading Preview

Multithreading in WinForms:

Individual Pre-Class Exercises:
<Due: 3/6>
  1. Delegate: To An Instance Method (Required)
         Functor/Delegate Project
  2. Delegate: To A Static Method (Required)
  3. Delegate: Multicast (Required)
  4. Delegate: Mixing static & instance
  5. Basic WinForms (Required)
     
  6. String Allocation Practice
    HowManyStrings.cs.txt
    String Allocation Practice -ANSWERS
     

Individual Pre-Class Exercises:
<Due: 3/13>

  1. Review for the exam

GROUP WORK: None for L10 GROUP WORK: None for L11
In-Class Exercises:
<Class Date: 3/8>
  1. Bitwise Ops: BitPrinter

  2. Bitwise Ops: GetBit, SetBit

  3. Bitwise Ops: SetOrClearBit
     

  4. Delegate: event keyword
        Example Code: Events

  5. Delegates in WinForms apps
  6. Defining Methods w/ WinForms

ON 3/8, AT THE BEGINNING OF THE LECTURE, ALMOST ALL HOMEWORKS, AND REVISIONS TO HOMEWORKS MUST BE HANDED IN.  THEY WILL NOT BE ACCEPTED AFTER THAT POINT IN TIME.

There are only two exceptions
1) A4 (or it's revision) may be handed in later
2) You may  hand in one other homework assignment ( or one other homework revision) after this date.
Thus, you will hand in at most 2 things (A4, or A4.1 and one other assignment) after this date.

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

  1. <Final Exam>

 

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

Back to BIT 142's homepage