BIT 142:Intermediate Programming (2008 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

Upcoming Due Dates:

(there are more dates listed in The Huge Due Date List, at the bottom of this page)

Due on:

(For items due on a Wednesday, the time which they are due by is the start of class, unless otherwise stated)

Activity
Wednesday, Sept 24
(No later than midnight)
Email the professor, so that the professor has your email address
Monday, Sept 29, by NOON PCE 01
Wednesday, Oct 1 Google Group: Sign yourself up, post a question, answer someone else's question:
Wednesday, Oct 1 PCE 02
Wednesday, Oct 8 A1 (initial version)
Lesson 01
 
Individual Pre-Class Exercises:
<Due:
Sept 29, noon PST (MONDAY of the SECOND week of the class) >
IDEA: Have something here about the basics of oop - defining a class, calling an instance method, etc?  The RunExercise pattern follows this, and would set up well for a 'function call review' in PCE 02/03
IDEA: Do the OOP thing - pull the lectures from PCE 05 (defining a class, calling an instance method) back to here (or at latest PCE 02)

IDEA:
L01: Basic objects (class, simple method) --> Unit tests by hand, the debugger
L02: NUnit, debugging NUnit tests (include class time in this lecture to debug students' problems?)
L03: Full-on NUnit
IDEA: Have the 'feedback' include a section on the tests - "Did you write correct code that worked, that failed a test b/c it didn't meet the expectations of the test?"
IDEA: Provide a 'failing NUit test' for them to debug, in-class
BE VERY VERY CLEAR THAT STUDENTS NEED TO WORK OFF THE C:\DRIVE @ CCC, and that any work that's been left there will be deleted.

  1. Orient yourself to BIT 142
     
  2. Get Visual Studio
  3. Install the software for XNA
    The XNA-based PCEs and assignments will be optional.
    You can install this software later, if you don't want to install it right now
     
  4. Join the class newsgroup ; Send the professor your email address (Required)
     
  5. Create a simple console application  (Ch 3.3 (walkthrough), 3.2 (explanation of the program) )  
    There is a
    Demo Video that walks you through this, too

  6. Downloading and using a simple console application
     
  7. 'Starter' project for the lesson 01 PCEs (Pre-Class Exercises) (DOWNLOAD THIS!!)

  8. Basic Console I/O     (Sect. 3.5)
  9. Basic Arithmetic Operators (Sect. 3.6, 3.8)
  10. Comparison Operators (Sect. 3.9)
  11. Defining & Using an Instance Methods (Sect. 4.1-4.3 (mostly 4.3))
  12. Function Calls: A Handy Trick (on your own)
  13. Data Types (Hand-In) (Sect. 5.11, Appendix L)
    (This was updated on 9/24 to include some additional questions at the end of the file)
     
  14. Order Of Operations (Hand-In) (End of Sect. 3.9, Appendix A)
  15. Console I/O, Operators (Hand-In) (previous readings)
     
  16. String Basics (Sect. 16.2) (Hand-In)
    (You may want to use this exercise as a springboard for posting questions / answers (to the Google group) about how to make good use of online help, both on the Internet, and inside Visual Studio's online help system.
     
  17. Comparing Strings (Sect. 16.5) (Hand-In)
     
  18. Web Hand-In for pre-class exercises and homework:
    Go to the StudentTracker web app, and create an account for yourself, and then enroll in the course.
    Once you've created an account/enrolled, you can use this direct link to this, specific class:
    http://panitzco.com/CCC/StudentTracker/course_students/display/1
In-Class Exercises:
<Class Date: Sept 24 (Wednesday) >

(This class meets from 5:45-10:05pm this first week ;  it meets from 5:45pm -7:50pm thereafter)
 

Review:

  1. Create a simple console application (Ch 3.3 (walkthrough), 3.2 (explanation of the program) )  Demo Video
  2. Downloading and using a simple console application
  3. Defining & Using an Instance Methods
  4. Basic Console I/O

Videos:

  1. First day's lecture, Part "1"
  2. First day's lecture, Part "2"

Preview:

  1. % operator
  2. integer division
  3. Different types of loops
  4. nested loops
Instructor's Materials:
Notes
IDEA: Incorporate the 'how to do the PCEs' into the class orientation, and/or split out a video on it?
TODO: Make sure that students have been alerted to the '4 hours on the first day' thing!!!!!
TODO: Change the Google Group thing to just be "post something - a question, an answer, etc"  What about an 'answer 1, ask 1' "game"?

Slides

 

Lesson 02

 

Individual Pre-Class Exercises:
< Due: Wednesday, Oct 1
, before the start of class >
  1. 'Starter' project for the lesson 02 PCEs (Pre-Class Exercises)

  2. Integer vs. real division (End of Sect. 5.6, also Sect. 3.8) (Hand-In)
                                        (Demo Video   VS Project Used in the Video 
    (How to access demo projects) )
    (This was updated on 9/24 to include some additional questions)
     
  3. Modulus operator ( % ) (Section 3.8) (Hand-In)    (Demo Video)
    Feedback: Clarify that this produces an
     
  4. Fahrenheit to Celsius (Based on your previously acquired knowledge) (Hand-In)
     
  5. Logical operators (Section 6.8)
    Feedback: How to check one's work?

  6. Conditional statements (If: Sect. 5.3 / If...Else: Sect. 5.4 / Switch: Sect 6.6 ) (Hand-In)
    Feedback: If & if/else were redundant ; switch was good practice
    Feedback: Strategies for when to use each on


  7. Simple loops - while, for (Sect. 5.5)
     
  8. keywords: break / continue (Section 6.7)
     
  9. Compound Assignment operators (Section 5.9), Increment / Decrement operators (Sect. 5.10)
    Feedback: Quick paragraph would be better?
     
  10. Basic Random Number Generation (Sect. 7.9 (Shift/scale: 7.9.1)) (Hand-In)
    (This was updated on 9/24 to include some additional questions)
    Feedback: More of a demo - each part appeared to be destroying the previous one. make people create few subversions for the same thing. Do like in the Conditional_Statements  
    Feedback: Link to tutorial online?
  11. Basic Parameters (Sect. 4.4) (Hand-In)
    (This was added to this lesson on 9/24)
    This is a very important topic to review, the Lesson 03 lecture will assume that you're familiar with parameters & return values!!)
    Feedback: More of a demo - VIDEO THIS?
     
  12. Return Values (Sect 4.5 and 7.5 both have limited information.  Additional information is available at http://www.fredosaurus.com/notes-cpp/functions/return.html (This was added to this lesson on 9/24)
    (this is actually a good reference, even though it's technically for C++ rather than C#) )
    (You may want to review the
    Defining & Using an Instance Methods exercise from Lesson 01)
    Feedback: Clarify what to do here?
     
  13. Post at least 1 question in the Google Group for this class.
    Answer at least 1 question (that someone else has posted) in the Google Group for this class
    (Not doing this will result in a point penalty)

     

  14. PCE Feedback (Hand-In)
    (Not handing this in will result in a point penalty)
In-Class Exercises:
<Class Date: Wednesday, Oct 1 (Class starts at 5:45pm, and goes till 7:50pm - this schedule will be followed throughout the rest of the term)

 

Videos:

  1. Intro & Overhead: Due dates, new assignments, etc, etc
  2. Review of previous topics
  3. Random number generation ; brief section on functions

Review Topics:

  1. Q+A: Integer division
  2. Q+A: Remainder ('Modulus') operator
  3. Q+A: Functions, Parameters, and Return values

Preview Topics:

  1. Random # basics   Demo File
  2. Random numbers, manually bounded   (Demo File)
      
  3. Nested Loops: Rectangles

  4. Basic parameter, return value review
  5. Reference Parameters (out, ref) , and normal return values

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 Wednesday, Oct 8)

Individual Pre-Class Exercises:
<Due:  Wednesday, Oct 8
, before the start of class>

  1. 'Starter' project for the lesson 03 PCEs (Pre-Class Exercises)
     
  2. Sentinel-controlled loops: Averaging numbers (Sect. 5.7)
     
  3. Nested Loops: Rectangles  (Sect. 5.8) (Demo Video   VS Project Used in the Video)
  4. Nested Loops: Hollow Rectangles (Sect. 5.8) (Hand-In)
     
  5. Printing A Range Of Numbers (Previous Knowledge) (Hand-In)
     
  6. Built-in Math functions  (Hand-In (Sect. 7.3)
     
  7. Return Values (Sect 4.5 and 7.5 both have limited information.  Additional information is available at http://www.fredosaurus.com/notes-cpp/functions/return.html (this is actually a good reference, even though it's technically for C++ rather than C#) )
    (You may want to review the
    Defining & Using an Instance Methods exercise from Lesson 01)
     
  8. Printing numbers, w/ params (Sect. 4.4) (Hand-In
    (2008Fa version)

    (You may want to review the Basic Parameters and Return Values exercises from Lesson 02)
     
  9. Generating Random Numbers Using A Separate Class  (Sect. 7.9 (Shift/scale: 7.9.1)) (Hand-In

  10. Feedback: Having lots of instructions for a short amount of code is actually confusing
     
  11. Justifying Reference Parameters (out, ref) , and normal return values  Sect. 7.14)
    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.
     

  12. 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 homework assignment 2, et al.)

Optional XNA Exercises

    The following tutorials are provided to help you understand the basics of XNA, and the custom XGA1 library that this class will use on top of XNA.  Each tutorial should have a completed, fully functional Visual Studio project that you can download and run, in order to see the final result of that tutorial, plus a detailed explanation of the code in that project.

    Note that NONE of these are required, but you may want to work through them before attempting the XNA/video-game based homework assignment(s) (#3 and maybe #4). Each tutorial has several exercises at the end, and you're welcome to do as many of those as you'd like.  Tutorials that the instructor strongly recommends are marked "Do this", while tutorials that

    Please feel free to discuss these on the Google Group!

  1. Do this: Understanding all the parts of a Visual Studio XNA/XGC1 project & seeing the 'Big Picture' of how XGC1 games work
  2. If you're curious: How to create a blank XNA project in Visual Studio
    (This walks you through the process of creating a completely blank XNA project in Visual Studio.  Not really needed (since you'll get starter projects for the game-based stuff), but it's always nice to understand "how the magic happens")
  3. Do this: Putting messages at the top/bottom of the screen
  4. Do this: How to get your game to react to the controller/keyboard
  5. If you're curious: Local & Instance variables in XGC1 games
    (This talks about the difference between local variables & instance variables, as used in the video games that you'll see.)
  6. Do this: drawing a rectangle on the screen
  7. Do this: drawing a circle on the screen
  8. Do this: How XGC1 uses constants
  9. If you're curious: A good start at a real game: SoccerPong!
    (This tutorial is the 'capstone' for Topic 4 (Decision Structures)  ).  If you're interested in how to put together a game, this will get you started!

If you're curious, there are many more tutorials, designed to teach most the topics that you'll see in this class.  The tutorials were written with a different book in mind, but there is still a page that maps the tutorials to your C# textbook.  That map, and links to the tutorials themselves, can be found at : http://depts.washington.edu/cmmr/Research/XNA_Games/2.XNA_GTC1/Releases/Pre-Release/TextbookMapping.htm

In-Class Exercises:
<Class Date: Wednesday, Oct 8 >

 

Videos:

  1. Intro & Overhead: Due dates, new assignments, etc, etc
  2. Return values vs. ref / out parameters
    Link to the 'rules of thumb' page from OneNote
  3. Array Review, Passing arrays to functions, returning arrays from functions

Research Opt-Out Form

 

Review /  Q + A

  1. Reference Parameters (out, ref) , and normal return values
    You'll notice that this is the same as one of your pre-class exercises.  With a partner, go through, and discuss your answers, paying particular attention to the 'why does
    X make sense here, rather than Y or Z?' questions
  2. Design: return values vs. out vs. ref parameters (Sect. 7.14) (optional)

Preview:

  1. Arrays: Basics (Sect. 8.1, 8.2)
  2. Arrays: Tracking grades in an array
     
  3. Nested Loops: Multiplication Table (optional)
  4. Passing values to, from arrays
Instructor's Materials:
Notes
Slides

 

Lesson 04
Individual Pre-Class Exercises:
<Due: Wednesday, Oct 15
before the start of class>

Feedback: More practice passing parameters to methods? 

  1. 'Starter' project for the lesson 04 PCEs (Pre-Class Exercises)

  2. Justifying Reference Parameters (out, ref) , and normal return values  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.

  3. Nested Loops: Square of Numbers (Sect. 5.8)
  4. Nested Loops: Triangle of Numbers (Sect. 5.8) (Hand-In)
    Feedback: Specify that students need to write code that CAN print both patterns, and that allows the user to choose which to print
    Feedback: How many rows/columns to print for input like 8?
     
  5. Detecting Prime Numbers (Previous Knowledge) (Hand-In)
    Feedback: Be clear about what a prime number is, AND be clear that the focus of the exercise is to come up with an algorithm on their own to determine primality.
     
  6. Arrays: Basics (Sect. 8.1, 8.2)
  7. Arrays: Usage (Sect. 8.3)
  8. Arrays: Using only part of the array (Previous Knowledge) (Hand-In
  9. Fibonacci numbers in an array (Previous Knowledge)
     
  10. Passing arrays to functions (Sect. 8.7, 8.8) (Hand-In
    This was difficult for several students - more lecture time?
    Feedback: Video on this?
    Feedback: A bit hard to tell what to uncomment, since it's all //  - use /*, or else double-comment?
    Feedback: Much of this is given to the students already - have another one where they get to write everything from scratch?

     

  11. Returning an array from a method  (Hand-In
    (http://www.java2s.com/Code/CSharp/Language-Basics/Returnanarray.htm has an interesting example; you should feel free to Google for more info, if you need it)
    Request: Talk about Array.Copy (similar to VB's ReDim Preserve), and/or sorting?
    Feedback: Video on this?
     
  12. Overloading: Basics (Sect. 7.12) (Hand-In) (Demo Video   VS Project Used in the Video )
     
  13. PCE Feedback (Hand-In) (This will be graded)

In-Class Exercises:
<Class Date: Wednesday, Oct 15 >
 

Video:

  1. Intro / Overhead ("What's due when")
  2. OOP Overview
  3. OOP Basics: Methods
  4. OOP Basics: Data
  5. OOP: Access Modifiers (private/public) and scope ; Getter/Setter methods
  6. OOP: Constructors

Review:

  1. Q+A

Preview:

  1. Basic OOP - objects & instance vars.   (Chapters 4, Chapters 9)
  2. Review of classes & instances (Ch 4, Sect. 4.3)
  3. Classes with instance data (Sect. 4.5)
  4. Access Control (public, private) (Sect.  9.3)
     
  5. String Allocation Exercise
    String Allocation Rules    
    (Sample Project For String Allocation Exercise)

Instructor's Materials:
Notes
Slides
 

 

Lesson 05

DUE: Assignment 2 (Due Wednesday, Oct 22)

Individual Pre-Class Exercises:
<Due: Wednesday, Oct 22
 before the start of class>
  1. OOP Basics:
    (Demo Video   Example Project)
    OOP Encapsulation:
    (Demo Video   Example Project)

    More Background Info:
       OOP Concepts (from Sun Microsystems - the Java People)
    (Focus on the "What is an Object?", "What is a class?", and "What is inheritance?" sections - the others are nice to read, but not mandatory)
     
  2. 'Starter' project for the lesson 05 PCEs (Pre-Class Exercises)

  3. Basic Class with instance method (Sect. 9.2)
    Video from the lecture: OOP Basics: Methods
     
  4. Instance Variables: Adding Data To Your Class (Sect. 4.2+, Sect. 9.2)
    Video from the lecture: OOP Basics: Data

  5. More Methods: SetValue, SetValues, Print
    Video from the lecture: OOP: private/public; Scope ; Getters/Setters

  6. Access Control (public, private) (Sect. 9.3) (Hand-In)
    Feedback:
    Include sample output from the desired program?
    Feedback: Go over common errors that are caused by public/private (including related stuff like other not being able to access instance vars in other classes generally)
  7. Overloading: Create your own (Sect. 7.12)
  8. Constructors  (Sect 4.9, Sect. 9.6) (Hand-In) - basic
    Video from the lecture: OOP: Constructors
    move to earlier?
    Feedback: Felt out of order - move to 3.5 (between basic class & instance variables)?
    Feedback: Passing data via 6 parameters is kinda kludgey - put a comment in to confirm this?


  9. Variable Scope (class, instance, local/param vars) (Sect. 7.11) (Hand-In)
    Feedback: Provide code that demonstrated 'scope creep' and make students fix it?

  10. String Allocation Exercise
    String Allocation Rules
    HowManyStrings.cs.txt
    String Allocation Practice -ANSWERS
    Feedback: Better demonstration of concepts?
    Feedback: Not enough boxes for all the answers
     
  11. Video Feedback (Hand-In)

IDEA: Extract a couple of classes from a narrative? If so, 'extract a base class from a narrative' will work well in the next lesson..

In-Class Exercises:
<Class Date: Wednesday, Oct 22 >


Videos:

  1. Intro / Overhead ("What's due when")
  2. Constructor Review
  3. Passing an object to a method (objects as parameters) ; also talks about null references a fair amount
  4. Return an object from a method (objects as return values)
  5. Array of Object References
  6. Class with an array of Double values inside it (GradeTracker)
  7. Class with an array of Object References inside it (PointTracker)
  8. Class with an array of Object References inside it WITH NULL VALUES (PointTracker)

Review:

  1. Post A1 Survey (this must be done by Friday, Oct 24th, at noon)
  2. UWB presentation
  3. Q+A : Basic OOP (Methods + Data ; Encapsulation)
     
  4. Designing a class: Circle
  5. Testing a class: Circle
     

  6. StringBuilder review

Preview:

  1. Mixing Arrays and Classes: A Class that contains an array (Previous Knowledge)
    Mixing Arrays and Classes: An array within a class (Previous Knowledge)  (Hand-In)  (Demo Video     Starter Project)
  2. Object Composition (Triangle made of Points) (Sect. 9.8)
  3. Array of (possibly null) objects
     
  4. Time permitting: Composing a class out of other classes (Circle with a Point for a location)
  5. Time permitting: Distance Between Two Points
  6. Time permitting: Overlap method
  7. Time permitting: Interaction between classes
Instructor's Materials:
Notes
Slides
 

 

Lesson 06

Post A1 Survey (Due: Friday, Oct 24th, at noon)
 

DUE: Assignment 3 (Due Wednesday, Oct 29)

Individual Pre-Class Exercises:
<Due: Wednesday, Oct 29 before the start of class >

  1. 'Starter' project for the lesson 06 PCEs (Pre-Class Exercises)


    OBJECTS AND PARAMETERS & RETURN VALUES:

  2. Passing an object to a method         Wikipedia: Separation of Concerns    Coupling
    (Video: Passing an object to a method (objects as parameters) ; also talks about null references a fair amount )
    Feedback: A bit intense for the first exercise - break video into two parts, or maybe have an easier, warm-up exercise?
    Feedback: Redo the sentinel loop (instructions & code differ in minor details?)
    Feedback: Is the Television class allowed to directly access it's private variables, or must it also use the getter/setters?
     
  3. Returning an object from a method
    (Video: Return an object from a method (objects as return values)

  4. Passing two objects to a method, then returning one of them (Hand-In)
    Feedback: Separate out the Television class as a separate PCE?
    Clarify: Completing this one requires the completion of the prior two - will students be graded on the prior two non-required ones?
    Feedback: Put stuff about TV at top? Then do the PrintTV stuff, then the rest?
    Feedback:AskUserForTV not clear (method? class?)(?)
    IDEA: Identify as a 'challenge' project, that builds on the other two?
    Feedback: Which class goes with this?

    ARRAY OF OBJECTS

  5. Mixing Arrays and Classes: Array that contains many objects  (Previous Knowledge)
    (Video: Array of Object References)
     

  6. Array of (possibly null) objects (Hand-In) (Previous Knowledge; Chapter 8 (Page 261 may be useful) )
    Feedback: This is a dup of #8, below - remove it from here?
    Clarify: Keep all loops in code
    Feedback: First part of instructions didn't completely match the summary @ end?
    Feedback: TODOs were very helpful for finding work to do x2


    ARRAY INSIDE OF A CLASS
     

  7. Mixing Arrays and Classes: An array within a class (Previous Knowledge)  (Hand-In)  (Demo Video     Starter Project)
    (Video: Class with an array of Double values inside it (GradeTracker))
    (Make sure to include the starter project (but not the bin/obj subdirectories) in the .ZIP that you hand in!)
    TODO: Merge this project into the main starter project
    Feedback: ID this as a challenge project, and then provide another, easier exercise?
    Feedback: Kinda simple, since 95%+ of the code is provided to you.
    Feedback: Note the synthetic nature of the multiple loops

  8. Mixing Arrays and Classes: A Class that contains an array of (possibly null) reference types (Hand-In) (Previous Knowledge; Chapter 8 (Page 261 may be useful) )
    (Video: Class with an array of Object References inside it (PointTracker))
    (Video: Class with an array of Object References inside it WITH NULL VALUES (PointTracker))
    Feedback: This is a dup of #6, above
     

  9. PCE Feedback (Hand-In) (This will be graded)

  10. Video Feedback (Hand-In) (This will be graded)

IDEA: Extract a base class from a narrative?

IDEA: More consistent use of the 'separation of concerns' bit? Or else eliminate?
Feedback: More examples of passing arrays of objects?

In-Class Exercises:
<Class Date: Wednesday, Oct 29  >
 
Former part of the PCEs, removed for the 2008 Fall term:
  1. COMPOSING A CLASS OUT OF OBJECTS:

  2. An object composed of other objects (Triangle made up of 3 Points)
  3. Name Game: Analyzing String Creation (Sect. 16.10 may be useful here)
    Name Game Project (VS 2003)
    Feedback: Upgrade to VS 2005.  Maybe incorporate into starter project?

ADD NEW: Constants (needed for A4)

 

Videos:

  1. Intro / Overhead ("What's due when")
  2. Midterm Review
  3. Inheritance: Basics
  4. Inheritance:Constructor specific stuff
  5. Inheritance: abstract classes

Review:

  1. Midterm Exam: Q+A & Review   (including inheritance)

Preview:

  1. Inheritance: Basic Example (Chapter 10: Inheritance)
  2. Inheritance: Constructors
  3. Inheritance: Calling Methods in the base class
  4. Inheritance: Abstract base class
     
  5. Optimization: StringBuilder
    DEMO: StringBuilder: First Try
Instructor's Materials:
Slides
 

 

Lesson 07
Individual Pre-Class Exercises:
<Due: Wednesday, Nov 5 before the start of class; no penalty until Nov 12 >
(There is no penalty for handing this lesson's PCEs in until Nov 12- you are still responsible for knowing the material on the midterm exam!)

Feedback: More time on inheritance (not in this PCE, but maybe future ones?)
Feedback: Book sections again?

  1. Review for the exam!

  2. OOP Inheritance (Specialization):
    (Demo Video   Example Project)

  3. 'Starter' project for the lesson 07 PCEs (Pre-Class Exercises)
    Feedback: StringBuilder stuff left @ end?

  4. Basic Inheritance  (Chapter 10: Inheritance) (Hand-In)
    Video: Inheritance: Basics

  5. Observation: Lots of people jumped to using the new keyword on the derived print (instead of waiting until #6)

  6. Inheritance: Constructors
    Video: Inheritance:Constructor specific stuff

  7. Inheritance: Calling Methods in the base class (Hand-In)
    Feedback: Clarify difference between new & override

  8. Inheritance: Abstract base class
    Video: Inheritance: abstract classes
    Feedback: Include a code sample?

  9. Overloaded Constructors: Calling One Constructor From Another  (Hand-In)
    Feedback: Video?

  10. PCE Feedback (Hand-In) (This will be graded)

In-Class Exercises:
<Class Date:
Wednesday, Nov 5 >

  1. Midterm Exam: Q+A & Review   (including inheritance) (Video: Midterm Review )
  2. <Midterm Exam>
     

Videos:

  1. Basic Polymorphism
  2. Polymorphism  & Arrays
  3. C# Properties
Instructor's Materials:
Notes
Slides

 

Lesson 08

DUE: Assignment 4 (Due Wednesday, Nov 12)

Individual Pre-Class Exercises:
<Due: Wednesday, Nov 12
 before the start of class>
Feedback: Is there a video introduction to polymorphism floating around? x2
Feedback: 'Real world' uses of polymorphism?
Feedback:
More polymorphism exercises?

Feedback: More lecture time on this important topic!!

  1. 'Starter' project for the lesson 08 PCEs (Pre-Class Exercises)

  2. Explaining basic polymorphism
    Video: Basic Polymorphism

     

  3. Creating a basic, polymorphic method ( Word 2007 format ) ( HTML format )
    NOTE: If you don't have Office 2007, then you can instead use a free Word Viewer From Microsoft to view the Word 2007 file.

  4. Polymorphism and arrays (Hand-In)
    Video: Polymorphism  & Arrays
    TODO: List the chapter/section from the book that covers this in detail
     

  5. Overriding a standard method: ToString (Hand-In)
    Feedback: Give some examples of how this might be useful.
    Feedback: Too easy
     
  6. Polymorphism, arrays, and the ToString method
     
  7. C# Properties  (Sect 4.5) (Hand-In)
    Video: C# Properties
    Feedback: This exercise requires a second, different Point class.  Rename it?
    Feedback: This exercise tells students to play around with trying to create read-only properties... and the next one then makes them do RO props
    Feedback: More explanation about the 'value' variable
    Feedback: More explanation about properties in general (textbook is kinda light)
     
  8. Read-only Properties
    Feedback: Cite some classes that students already use that have read-only properties
     
  9. Polymorphism: virtual, override, new (Read Briefly)
    File: Inheritance.zip

     
  10. PCE Feedback (Hand-In) (This will be graded)
In-Class Exercises:
<Class Date: Wednesday, Nov 12 >
 

IDEA: Replace these with review exercise, then something to transform from text to code?

 

Videos:

  1. Intro / Overhead
  2. Recursion (Tracing The Mechanics Of A Recursive Function Call)
  3. Recursion (Using the 'multi-copy' printouts)
  4. Recursion (Basic Coding Strategies)

Previews:

Feedback: .DOCX is still bad - put into .DOC if possible
Feedback: Warm-up #1 isn't the same in the many-per-page version - CHECK ALL

Feedback: Explain the ?: operator, or else throw in a note telling them to look it up?

  1. Recursion By hand: Warm-up #1  Single Copy             Many Copies On One Page
  2. Recursion By hand: Warm-up #2  Single Copy             Many Copies On One Page
  3. Recursion By hand: Warm-up #3  Single Copy             Many Copies On One Page
  4. Recursion By hand: More Complicated  Single Copy             Many Copies On One Page 
     
  5. Time Permitting: Recursive Power Function
  6. Time Permitting: Recursive Multiplication
  7. Time Permitting: Fibonacci Numbers (And Arrays!)
     
  8. Counting objects (review, solution)
Instructor's Materials:
Notes
Slides   

 

Lesson 09
Individual Pre-Class Exercises:

< Due: Wednesday, Nov 19  before the start of class >

Link: Excel-based trace table

Feedback: provide a motivation for this - how/where is this technique normally used?

  1. 'Starter' project for the lesson 09 PCEs (Pre-Class Exercises)
    (This includes the 'printable' recursion warm up exercises, in the folder named "PCE09_Printable_Recursion_WarmUps")


  2. Recursion By hand: Warm-up #1
  3. What does this code print? (Hand-In)
    Video: Recursion (Tracing The Mechanics Of A Recursive Function Call)
    Video: Recursion (Using the 'multi-copy' printouts)
    Feedback: Confusing to put this one in-between the numbered ones - either integrate this into the order, or else put it before?
    Feedback: Having a todo list (#1, #2) was ok, except that #1 said to jump down below #2, and it jumped into a "Q+A" part.  Rename the Q+A to be "Explanation", and put item #2 after all of that.
    Feedback: Picture was more confusing than just showing what happens in a trace?
     
  4. Recursion By hand: Warm-up #2 (Hand-In)
    Feedback: A bit too confusing, since it was one of the first ones
  5. Recursion By hand: Warm-up #3 (Hand-In)
    Feedback: Not confusing enough, considering the next one
  6. Recursion By hand: More Complicated (Hand-In)
    Feedback: These are the same as the in-class stuff - new ones?

  7. Basic (Crashing) Recursion (Sect. 7.13)
    One explanation of the stack (and related security issues) is available at http://www.csm.ornl.gov/~dunigan/smash.txt- it's probably more detailed than you need (and in the C language), so skim it for background, but don't read it in detail. (Side note: Java/C# were designed specifically to prevent stack/buffer overflows)
    Feedback: First paragraph was confusing, but picture helped
    Feedback: Article contains proof-of-concept shell code?  lookup "Smashing the Stack for Fun and Profit” "

     
  8. Basic Recursion (Sect. 7.13) (Hand-In)

  9. Recursive Power Function
    Video: Recursion (Basic Coding Strategies)

  10. Recursive Multiplication

  11. Sorting & Searching: setup for the next lecture (Hand-In)
     
  12. The following are not part of this week's PCEs, but are being left here for future terms:
    Object Allocation Exercise
    Object Allocation Rules
    HowManyObjects.cs.txt
    <Answers to be gone over in class>
  13. Object Allocation Exercise
    Object Allocation RulesHowManyObjects2.cs.txt

  14. PCE Feedback (Hand-In) (This will be graded)
In-Class Exercises:
<Class Date: Wednesday, Nov 19 >

 

CIEs:
1.      Go to: http://assessment.cascadia.edu or http://assessment.cascadia.edu/cie/default.aspx

2.      *Enter your SID and Pin #

3.      Select the class from the drop down menu

4.      Click on the Start Evaluation button

5.      Fill out and submit the survey

 

A2, A3 Surveys: http://www.panitzco.com/CCC/Survey/

 

Review:

  1. Feedback: Cover something 'real-world'?  XML?  (B-)Trees?

  2. Recursion: Recursive Pow, Multiplication
    (and trace?)

  3. Compare & Contrast Two Pow implementations

2008 Fall Videos:

  1. Intro / Overhead

  2. Video: Unit Testing: Overview of Unit Testing, Quick Run-Through of Basic NUnit features

  3. Video: Using a normal, console project (NOTE: The starter solution has now been fixed, so you no longer need to change the project type to Console App)

  4. Video: Details of how the NUnit tests are set up

  5. Video: How to run the tests in the GUI

  6. Video: How to run the tests under the debugger ; quick introduction to using a debugger

  7. Video: Generating a gradesheet

  8. Video: How to submit your (NUnit) based homework

  9. Video: How to work with the NUnit based starter projects; how your instructor will grade these

Instructor's Materials:
Notes

Slides   
Slides - NUnit

 

Lesson 10
Individual Pre-Class Exercises:
<Due: Wednesday, Nov 26  before the start of class  >
Feedback:
instructions are written generically, then fixedup for specific exercises (i.e., uncomment 2 lines of code, that don't exist)????
  1. 'Starter' project for the lesson 10 PCEs (Pre-Class Exercises)
    Slides (using in the following NUnit videos)
    Video: Unit Testing: Overview of Unit Testing, Quick Run-Through of Basic NUnit features
    Video: Using a normal, console project (NOTE: The starter solution has now been fixed, so you no longer need to change the project type to Console App)
    Video: Details of how the NUnit tests are set up
    Video: How to run the tests in the GUI
    Video: How to run the tests under the debugger ; quick introduction to using a debugger
    Video: Generating a gradesheet
    Video: How to submit your (NUnit) based homework
    Video: How to work with the NUnit based starter projects; how your instructor will grade these
    All NUnit video files, .ZIPped into a single file
    IDEA: Show a walkthrough of using the debugger to track down a problem (run in GUI, change mode, run under debugger, step through code, OBSERVE THE 'EXCEPTION STOPPING THE TEST THING', fix & re-run, etc.
    IDEA: Introduce them to unit testing (via laborious console work) in L01, then NUnit in L02/03, then full on NUnit from there on out?


  2. Sorting & Searching: setup for the class
  3. Linear Search
  4. Binary Search
    Feedback: WHat does 'half' refer to?
  5. Write recursive binary search
    You are encouraged to discuss this with your peers, using the Google Group, if you're looking for more guidance with the details of the algorithm!
  6. Linear Search: Measuring Performance (Hand-In)
    Video: Linear Search, Binary Search, Big Oh notation
  7. Binary Search: Measuring Performance (Hand-In)
    Feedback: Clarify what is meant by comparisons?

  8. BubbleSort
    Video: BubbleSort (2008Sp)    BubbleSort( 2008 Winter)
    Feedback: 'slot below it' is not intuitive; pseudocode makes it sound like there's only 1 pass?

  9. BubbleSort: Measuring Performance (Hand-In)
    Feedback: parameters are backwards (numSwap vs. cumComparisons)
    Feedback: Specify that this needs to deal with the null reference, as a parameter


  10. PCE Feedback (Hand-In) (This will be graded)
    (Please focus your feedback on the NUnit-based starter project.  Thanks!)
     
  11. The following are not part of this week's PCEs, but are being left here for future terms:
    StringBuilder Tutorial (Required)
    Example Project #1            Example Project #2             Example Project #3              Example Project #4
In-Class Exercises:

<Class Date: Wednesday, Nov 26 >

  1. Final Exam: Q+A & Review  

  2. Linear Search By Hand

  3. Binary Search By Hand

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

  6. Analyzing the different algorithms (Hand-In)
    (Demo Video: Scatter Plots in Excel)
    If you're looking for more information about Big "Oh" Notation, you can find it here.  You are also invited to search the Internet, etc.
  7. < Algorithms Review >
    Runtimes.xls
     
  8. Big "Oh" Notation (Mike's explanation)
    Big "Oh" Worksheet: Function Review
    Big "Oh" Worksheet: Practice Analyzing Time & Space
  9. Using .Net's Array.Sort, Array.Search 
    Feedback: Also cover Array.Copy?

Instructor's Materials:
Notes
Slides

 

Lesson 11

Individual Pre-Class Exercises:
<Due: Wednesday, Dec 3
before the start of class >

  1. Final Exam: List of Review Topics

In-Class Exercises:
<Class Date: Wednesday, Dec 3 >

  1. Post-Course Evaluation

    (Required - this is an online survey, so you won't 'hand in' anything) (You will do this BEFORE you start the final)

     

  2.  <Final  Exam>

Instructor's Materials:
Slides

The Huge Due Date List

Note: This list is an attempt to collect up in a single spot all the due dates for the term.  These dates may change.  There may be more items added.  It is your responsibility to make sure that you know what's due when, to make sure that you don't miss anything.

In particular, the homework revisions may be moved to a week earlier, if the instructor can return the initial version within 24 hours of the due date.

Due on:

(For items due on a Wednesday, the time which they are due by is the start of class, unless otherwise stated)

Activity
Wednesday, Sept 24
(No later than midnight)
Email the professor, so that the professor has your email address
Monday, Sept 29, by NOON PCE 01
Wednesday, Oct 1 Google Group: Sign yourself up, post a question, answer someone else's question:
Wednesday, Oct 1 PCE 02
Wednesday, Oct 8 A1 (initial version)
Wednesday, Oct 8 PCE 03
Wednesday, Oct 15 PCE 04
Wednesday, Oct 22 A1 (final, revised version)
Wednesday, Oct 22 A2 (initial version)
Wednesday, Oct 22 PCE 05
Wednesday, Oct 29 A3 (initial version)
Wednesday, Oct 29 PCE 06
Wednesday, Nov 5 MIDTERM  EXAM
Wednesday, Nov 5 (no penalty until Nov 12) PCE 07
Wednesday, Nov 12 A2 (final, revised version)
Wednesday, Nov 12 A4 (initial version)
Wednesday, Nov 12 PCE 08
Wednesday, Nov 19 A3 (final, revised version)
Wednesday, Nov 19 PCE 09
Wednesday, Nov 26 A4 (final, revised version)
Wednesday, Nov 26 PCE 10
Wednesday, Nov 26 Final Date To Hand In Any PCEs, Homeworks (or revisions to homeworks)
Wednesday, Dec 3 PCE 11
Wednesday, Dec 3 FINAL  EXAM

 

Back to BIT 142's homepage

Unused Lecture Material

BIT 143's Lessons Page

 

Solicit Feedback On:

PCE 01: is it confusing to have the 'create your own console' exercise, then have to use the template a lot
Is it better to put off the ref/out/return values till later?  ordering of functions vs. OOP?
How helpful was it to have the 'upcoming due dates' and the 'grand table of due dates'?

 

Overall Feedback:
Make sure that all starter projects compile as downloaded
Include a copy of the desired program's output?