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

Assignment 1 (Due Wednesday, Oct 14, by the start of class)

(Due during week #3)

In-Class Exercises:
<Class Date: Wednesday, Sep 30> (This class meets from 5:45-7:50pm every Wednesday, including this one)  

Opt-Out Form
Pre-Course Survey

Videos:

  1. First day's lecture: Overall orientation to BIT 142
  2. StudentTracker (how to create an account & brief overview)
  3. What is a Visual Studio Project? (brief overview)
  4. How to work in this class
    (how to download, extract and open a project,
    make use of the exercise documents,
    prepare, .ZIP, and hand in your homework)
    Plus an orientation to C# & enough OOP review to get you started

Instructor's Materials:
Notes
Slides

 

Individual Pre-Class Exercises:
<Due: W
ednesday, Oct 7 , by the start of class (WEDNESDAY of the SECOND week of the class) >
  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 (Hand-In) (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)
     
  14. Order Of Operations (Hand-In) (End of Sect. 3.9, Appendix A)
  15. Game-Themed Instructional Modules:
    Topic #2.1, Ex #2:
    (1000.010)  (there are no required exercises for this - just orientation)
    This explains the basic project components - InitializeWorld/UpdateWorld, the coordinate system, and  XNACS1Base.World.WorldMax.Y
    NOTE:
    The 'starter project' for this is in the directory named Topic 2.1 Ex 2, in the .ZIP file that you download in step #7, above.  The next couple of modules follow this pattern, too.
  16. Topic #2.2, Ex #3 (2000.300)   (Hand-In)
    This explains what local variables are (both simple ints and the complex Vector types), and  EchoToTopStatus
    You must do FURTHER EXERCISE #3 and FURTHER EXERCISE #4
    Write your answers into the file named Topic_2_2_Ex_3_Answers.doc & include it in your .ZIP file that you submit
  17. Topic #2.2, Ex #4 (2000.305)  (Hand-In)
    This explains what instance variables are
    You must do FURTHER EXERCISE #3 and FURTHER EXERCISE #4
    Write your answers into the file named Topic_2_2_Ex_4_Answers.doc & include it in your .ZIP file that you submit
  18. Topic #2.2, Ex #5 (2000.310)  (Hand-In)
    This explains how to draw  rectangles on-screen
    You must do FURTHER EXERCISE #8 using the starter project in the directory named Topic 2.1 Ex 5
    NOTE: You do NOT need to memorize colors!
  19. Topic #2.2, Ex #6 (2000.320) (Hand-In)
    This explains how to draw  circle on-screen
    You must do FURTHER EXERCISE #5 using the starter project in the directory named Topic 2.1 Ex 6

    (The list of all modules is available at: http://depts.washington.edu/cmmr/Research/XNA_Games/index.php?code=wkbk )
     
  20. 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/2

 

Lesson 02

 

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

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

Video:

  • Intro, due dates, et

  • Feedback: Why would we need to distinguish between ++a & a++? - Go over that loop trick

Instructor's Materials:
Notes
Slides

 

Individual Pre-Class Exercises:
< Due: Wednesday, Oct 14, by the start of class
>
  1. TODO: PRETEST FOR LOOPS 
  2. 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
    (Required - Not doing this will result in a point penalty)

  3. 'Starter' project for the lesson 02 PCEs (Pre-Class Exercises)

  4. Conditional statements  (Hand n)
    (If: Sect. 5.3 / If...Else: Sect. 5.4 / Switch: Section 6.6

  5. Console I/O, Operators (Hand-In) (previous readings)
     
  6. 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.
     
  7. Comparing Strings (Sect. 16.5) (Hand-In)
  8. 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) )
     
  9. Modulus operator ( % ) (Section 3.8) (Hand-In)    (Demo Video)
     
  10. Fahrenheit to Celsius (Based on your previously acquired knowledge) (Hand-In)
     
  11. Logical operators (Section 6.8)
    Feedback: How to check one's work?
    Feedback: Didn't really do anything with these
  12. Game-Themed Instructional Modules:
    Topic 2.4, Ex #1:
    (4000.010)
    This explains basics of animation
    I'd recommend that you do FURTHER EXERCISEs #2A, 2B, 2C, 2D - basically, fiddle with things to practice this
    NOTE: The 'starter project' for this is in the directory named Topic 2.4 Ex 1, in the .ZIP file that you download in step #3, above.  The next couple of modules follow this pattern, too.
  13. Topic 2.4, Ex #2 (4000.100)   (Hand-In)
    This explains how to make the ball
    bounce off the wall
    You must do FURTHER EXERCISEs #3, #4, and #5 - make the ball bounce off all sides of the screen, using the starter project in the directory named Topic 2.4 Ex 2
  14. Topic 2.4, Ex #4  (4000.200) (Hand-In)
    This explains the if...else statement
    You must do FURTHER EXERCISEs #4A, 4B, and 4C , using the starter project in the directory named Topic 2.4 Ex 4
  15. PCE Feedback (Hand-In)
    (Not handing this in will result in a point penalty)

 

Lesson 03 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)

Assignment 2 (Due Wednesday, Oct 28

(Due during week #5)

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

 

PREVIOUS MATERIAL:

  1. OLD #2Simple loops - while, for (Sect. 5.5)
  2. OLD #8 (after SENTINEL) Nested Loops: Rectangles  (Sect. 5.8)
    (VIDEO:
    Nested Loops   VS Project Used in the Video)

  3. Nested Loops: Hollow Rectangles (Sect. 5.8) (Hand-In)

  4. AFTER PRINTING A RANGE OF NUMBERS Built-in Math functions  (Hand-In(Sect. 7.3)
    Feedback: People were confused by the 0.1 TIMES PI thing x2
    Feedback: A lot of people were confused by the math - clarify that they're not really expected to use cos/sin, and then briefly explain pow/sqrt?  Tie to distance formula?

  5. Using The Distance Formula (Demo Video   Word Document Used in the Video)
    (There is nothing to hand in for this PCE, but we will use it in the various games that you make in this class.
    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, etc)


  6. Justifying Reference Parameters (out, ref) , and normal return values  Sect. 7.14)
    VIDEO: Return values vs. ref / out parameters

    Link to the 'rules of thumb' page from OneNote

    For this PCE, you are encouraged to discuss this other students, via the Google 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.

 

 

Review:

  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

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

Feedback: Clearly state that this weeks' theme is 'loops/parameters in objecs'?

  1. 'Starter' project for the lesson 03 PCEs (Pre-Class Exercises)
    Hand in only Student_Answers.cs and the feedback form!

  2. Game-Themed Instructional Modules:

    Start by showing a finished, compiled .490?

    Topic 2.5, Ex #1 (5000.050)
    Orientation to the game (Ex #2, #3 - move the lines so they're centered)
    NOTE: The 'starter project' for this is in the directory named Topic 2.5 Ex 1, in the .ZIP file that you download in step #1, above.  The next couple of modules follow this pattern, too.

     

  3. Topic 2.5, Ex #2 (5000.100)
    Draw a Simple Line (Ex #2 - draw 5 instead of 3, #3 (loop never run), #4 (infinite loop)

  4. Topic 2.5, Ex #3 (5000.110)
    Draw a sine wave (Ex #2 - spotting errors)

  5. Topic 2.5, Ex #4 (5000.120)
    Animate a ball moving along the sine wave (Ex #3B- draw a second (cosine) wave with a small soccerball on it)

  6. Topic 2.5, Ex #10 (5000.305)
    for loops (same as 160 exercises)

  7. Counting down

  8. Topic 2.5, Ex #17 (5000.380)
    Compound (&&) statements (NEED EXERCISE)

     

  9. Topic 2.5, Ex #18 (5000.400)
    Nested (for) loops - grid (Ex #3 - redo inner loop with a while loop (.410 shows a solution for this))


  10. keywords: break / continue (Section 6.7)
     
  11. Compound Assignment operators (Section 5.9), Increment / Decrement operators (Sect. 5.10)
     
  12. Basic Random Number Generation (Sect. 7.9 (Shift/scale: 7.9.1)) (Hand-In)
    Video: Basic Random Numbers
    Video: Random Numbers And Modulus
    File Used In The Demo

    .Next was confusing (what is it?)
    Feedback: 2b was confusing, after 2 (code is already there?)
    Feedback: 2c interpreted as non-random - explain this better

  13. Sentinel-controlled loops: Averaging numbers (Sect. 5.7)

  14. Printing A Range Of Numbers (Previous Knowledge) (Hand-In)
      
  15. Printing numbers, w/ params (Sect. 4.4) (Hand-In
    (You may want to review the Basic Parameters and Return Values exercises from Lesson 02)
    Feedback: PrintNumberS in .DOC, PrintNumbeR in .cs
    Feedback:Unclear about exact directions?

  16. PCE Feedback (Hand-In)

 

Lesson 04- DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)

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

TODO: Cinnamon does debrief here

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

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

SURVEY: Prior experience?

TODO: POST-TEST for loops

  1. 'Starter' project for the lesson 04 PCEs (Pre-Class Exercises)
    Hand in only Student_Answers.cs and the feedback form!

  2. NEW: Basic Parameters (Sect. 4.4) (Hand-In)
    Video: Basic Parameters
    This is a very important topic to review, the Lesson 03 lecture will assume that you're familiar with parameters & return values!!)eedback: More of a demo -  
  3. NEW: 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)
    Video: Return Values

  4. NEW: Generating Random Numbers Using A Separate Class  (Sect. 7.9 (Shift/scale: 7.9.1)) (Hand-In
    Feedback:
    More clarity on what to call?
    Code described != code in .SLN?
    IDEA: Dump the 'separate class' idea - just focus on random numbers....
  5. Justifying Reference Parameters (out, ref) , and normal return values  Sect. 7.14) (Hand-In
    VIDEO: Return values vs. ref / out parameters

    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.
    Feedback:
    This is a duplicate of the PCE 03 - explain why it's a dup

  6. Nested Loops: Square of Numbers (Sect. 5.8)
  7. Nested Loops: Simple Triangle of Numbers (Sect. 5.8)

  8. Nested Loops: Odd Triangle of Numbers (Sect. 5.8) (Hand-In
     
  9. Detecting Prime Numbers (Previous Knowledge) (Hand-In)
    Feedback: Should the math be further clarified?
     
  10. VIDEO: Array Review, Passing arrays to functions, returning arrays from functions
    Feedback: More videos on arrays - subdivide this?   Review?

    Arrays: Basics (Sect. 8.1, 8.2) (NUnit)

  11. Arrays: Usage (Sect. 8.3) (NUnit)

  12. Arrays: Using only part of the array (Previous Knowledge) (Hand-In)
    Feedback: Make it clear why they'll start seeing IndexOutOfBounds errors here
  13. Passing arrays to functions (Sect. 8.7, 8.8) (Hand-In
    Feedback: Make it clear why they'll start seeing IndexOutOfBounds errors here, and how to fix
    Feedback: Specify that starter code just offers SOME suggestions - students can/should change everything they need to, not al actions will be spelled out, etc
    Feedback: In example output, user enters 3,4, which then sums to 5?
    Feedback: Much of this is given to the students already - have another one where they get to write everything from scratch?
    Feedback: More practice passing parameters to methods? 

     

  14. 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)
  15. Fibonacci numbers in an array (Previous Knowledge)
                                                                                                                  (Fun link: Fibonachos)
     
     
  16. Overloading: Basics (Sect. 7.12) (Hand-In) (Demo Video   VS Project Used in the Video ) (NUnit)
    Feedback: Questions are easy/repetitive.  One was a dup.
     
  17. PCE Feedback (Hand-In) (This will be graded)

 

Lesson 05 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)

Assignment 3 (Due Wednesday, Nov 11)

(Due during week #8)

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


Videos:

  1. Constructor Review

Review:

  1. Post A1 Survey (this must be done by Wednesday, 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
 

Individual Pre-Class Exercises:
<Due: Wednesday, Nov 4, by the start of class>
IDEA:
Move the NUnit stuff to the end of this lesson
  1. 'Starter' project for the lesson 05 PCEs (Pre-Class Exercises)
    Hand in only Student_Answers.cs and the feedback form!
  2. Video: OOP Overview

              (Additional, optional video:
              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))


  3. Basic Class with instance method (Sect. 9.2)
    Video from the lecture: OOP Basics: Methods

     
  4. Constructors  (Sect 4.9, Sect. 9.6) (Hand-In)
    Video from the lecture: OOP: Constructors
    NOTE: This was originally last, after all the other videos:
     

  5. Instance Variables: Adding Data To Your Class (Sect. 4.2+, Sect. 9.2)
    Video from the lecture: OOP Basics: Data
    Feedback: More examples?

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

  7. Access Control (public, private) (Sect. 9.3) (Hand-In)
    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)
    Feedback: More detail on why all data should be private?
    Feedback: NUnit test is checking for a smart-quote?

  8. Overloading: Create your own (Sect. 7.12)


  9. Variable Scope (class, instance, local/param vars) (Sect. 7.11) (Hand-In)
    Feedback: Input should be int or double?

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

 

Lesson 06 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)
In-Class Exercises:
<Class Date: Wednesday, Nov 4  >
 
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)

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?

 

Videos:

  1. Inheritance: Basics
  2. Inheritance:Constructor specific stuff
  3. 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
 

Individual Pre-Class Exercises:
<Due: Wednesday, Nov 11, by the start of class (no penalty until Nov 18)>

Feedback: More info about why the NUnit tests are failing?

Feedback: Some exercises say "Create X", but the actual work is to just add to X
TODO: Funny quotes are causing tests to fail?
Feedback: Trouble checking an object for null?  (When do they check objects for null here?)

 

IDEA: Provide a 'failing NUit test' for them to debug, in-class
IDEA:
Introduce the minimum NUnit stuff here, then targeted videos on a per-exercise basis.

 

NUNIT Feedback: DURING TERM, CLARIFY WHAT SPECIFIC NUNIT ERRORS MEAN (IndexOutOfBounds in the arrays chapter, etc, etc)
NUNIT TODO: ADD FORMATTING FOR DECIMAL/DOUBLE (TWO DECIMAL PLACES IS FINE)

  1. 'Starter' project for the lesson 06 PCEs (Pre-Class Exercises)
    Hand in only Student_Answers.cs and the feedback form!


  2. Familiarize yourself with NUnit-based 'autograded' exercises:
    NOTE: Even though the videos say to Start Without Debugging, you should Start WITH Debugging, instead

    Video: What is Unit Testing?  (The bold-faced videos are expected to be especially helpful)
    Video: Overview of NUnit, Autograding in this class ; A couple of helpful tricks (These non-bold faced videos are good background)
    Video: Suggested Workflow ( "How you'll use NUnit, in this class" )

    Video: How the sample solution is set up
    Video: Details of using the GUI test runner program
    Video: Details of AutoGrader
    Video: Details of using the Debugger

    Only watch these once you've run into a test that uses them:

    Slides (used in the following NUnit videos)
    Feedback: A video entitled 'what to do if the tests won't start'?

    Note: The starter project for the below videos/exercises are incorporated into the project listed above (in item #1)

  3. Read this note: Tests to ignore

     

  4. Exercise: Make failing tests pass (Hand-In)
    Video: Source Code Basics
     

  5. Exercise: Making a basic unit test pass (Hand-In)
    Video: Basic Unit Tests
    Feedback: For this & next two, hard to relate to code in Student_Answers.cs
    Feedback: Excess code in Student_Answers.cs, repeated code in Tests_To_Run.cs?
    Feedback: ??? Need more clarity about how to run the tests?

  6. Exercise: Fixing broken output (Hand-In)
    Video: I/O Redirection

  7. Exercise: Fahrenheit to Celsius (tested by NUnit) (Hand-In)
    Video: Debugging Using 'Print' statements

  8. Exercise: Other things you'll see in NUnit tests
    Video: [Values] Attribute

    Video: [TestCase] Attribute

    Video: [SetUp] Attribute & per-test setup


    OBJECTS AND
    PARAMETERS & RETURN VALUES:

    Define the Television class (Hand-In)
    Feedback: CreateATV needs better def (or Ex #11?)

  9. Passing a basic object to a method 
    (Video: Passing an object to a method (objects as parameters) ; also talks about null references a fair amount )
    Wikipedia: Separation of Concerns    Coupling
    Note: Even though this exercise has NUnit tests, you are NOT required to pass them, because this is not a required exercise
    VIDEO: Passing an object to a method (objects as parameters) ; also talks about null references a fair amount
     
  10. Returning an object from a method
    (Video: Return an object from a method (objects as return values)
    Note: Even though this exercise has NUnit tests, you are NOT required to pass them, because this is not a required exercise
    VIDEO:Return an object from a method (objects as return values)

  11. Passing two objects to a method, then returning one of them (Hand-In)
    Feedback: Talk about the CreateATV method more?

    ARRAY OF OBJECTS

  12. Mixing Arrays and Classes: Array that contains many simple values  (Previous Knowledge)
    (Video: Array of Object References)
    Note: Even though this exercise has NUnit tests, you are NOT required to pass them, because this is not a required exercise
    VIDEO: Array of Object References

  13. Array of (possibly null) objects (NUnit) (Hand-In) (Previous Knowledge; Chapter 8 (Page 261 may be useful) )
    Feedback: (Break this up into smaller methods in order to make the human verification of test easier?
    Feedback: Not clear where to put the code - doc says "PrintArrayOfPossiblyNullTVs ", but this doesn't produce NUnit output?
    Feedback: The .doc says to uncomment the tests in NUnit_Tests_Array_Of_Objects but the assignment is for NUnit_Tests_Array_Of_Possibly_Null_Objects
    Feedback: This seems to be a problematic area
    Feedback: Part 1.e was a bit vague - add an extra loop is implied?

     

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


 

Lesson 07 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)

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

  1. Midterm Exam: Q+A & Review 
  2. <Midterm Exam>
     

Videos:

  1. Basic Polymorphism
  2. Polymorphism  & Arrays
  3. C# Properties

Instructor's Materials:
Notes
Slides

Individual Pre-Class Exercises:
<Due: Wednesday, Nov 18, by the start of class >
(There is no penalty for handing this lesson's PCEs in until Nov 18- you are still responsible for knowing the material on the midterm exam!)
Feedback: Add exercise on private vs. protected?
Feedback: Make sure that predicatable errors (such as when things get uncommented) are explained well ahead of time

NOTE:
Starting on Wednesday, May 27, make sure to print out all decimal / double values using two decimal places, like so:
decimal a = 10m, b = 10.0m;
Console.Writeline(“a:{0:0.00} b:{1:0.00}”, a, b);
  1. Review for the exam!

  2. 'Starter' project for the lesson 07 PCEs (Pre-Class Exercises)
    Hand in only Student_Answers.cs and the feedback form!

    ARRAY INSIDE OF A CLASS
     

  3. Mixing Arrays and Classes: An array of simple types within a class  (Previous Knowledge)  (Hand-In)
    Video: Class with an array of Double values inside it (GradeTracker)
    ( Additional Demo Video     Starter Project)
  4. 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)

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

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

  7. Feedback: Mention that Car sould be public
    Feedback: Assumed float, but then NUnit complained about doubles - be more clear about type of tank size/weight

  8. Inheritance: Constructors
    Video: Inheritance:Constructor specific stuff
    IDEA:  Add requirement that constructors validate that params are non-negative?
    Feedback: The doc says “All instance methods should be declared private, as per normal.” But I think you meant instance variables instead of instance methods


  9. Inheritance: Calling Methods in the base class (Hand-In)
    Feedback: The doc says “All instance methods should be declared private, as per normal.” But I think you meant instance variables instead of instance methods
    Feedback: No clean description of what the this()


  10. Overloaded Constructors: Calling One Constructor From Another  (Hand-In)

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

 

Lesson 08 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)

Assignment 4 (Due Wednesday, Nov 25)

(Due during week #9)

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

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

 

Videos:

  1. Recursion (Tracing The Mechanics Of A Recursive Function Call)
  2. Recursion (Using the 'multi-copy' printouts)
  3. 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   

Individual Pre-Class Exercises:
<Due: Wednesday, Nov 25, by the start of class>
TODO: List the chapter/section from the book that covers this in detail
TODO: 'Real world' uses of polymorphism?
TODO: 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
    NOTE: NUnit tests for this exercise show up in the GUI, but you are NOT penalized (by the autograder) for failing these!

  4. Polymorphism and arrays (Hand-In)
    Video: Polymorphism  & Arrays
    Feedback: Instructions say to uncomment the test, but it's not commented to start?
     

  5. Overriding a standard method: ToString (Hand-In)
    Feedback: Is the decimal point important?  How to format doubles?
     
  6. Polymorphism, arrays, and the ToString method
     
  7. C# Properties  (Sect 4.5) (Hand-In)
    Video: C# Properties
    Feedback: More explanation about the 'value' variable
    Feedback: Make make more obvious required vs optional testing on the C# material
     
  8. Read-only Properties
     
  9. Polymorphism: virtual, override, new (Read Briefly)
    File: Inheritance.zip

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

 

Lesson 09 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)
In-Class Exercises:
<Class Date: Wednesday, Nov 25 >

 

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

 

Review:

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

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

  3. Compare & Contrast Two Pow implementations

Instructor's Materials:
Notes

Slides 

Individual Pre-Class Exercises:

< Due: Wednesday, Dec 2, by the start of class >

Feedback: MultR & PowR are auto-dinging, but shouldn't be

  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)
     
  4. Recursion By hand: Warm-up #2 (Hand-In)

  5. Recursion By hand: Warm-up #3 (Hand-In)

  6. Recursion By hand: More Complicated (Hand-In)

  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)
     
  8. Basic Recursion (Sect. 7.13) (Hand-In)

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

  10. Recursive Multiplication
    Feedback: Remove (or explain) the private __MultR, and how it can be used to simplify the 'negative numbers' part of the problem.

  11. Sorting & Searching: setup for the next lecture (Hand-In)
    Feedback: Eliminate/merge into L10
    Feedback: "Moved it around a couple of times, and the NUnit tests still don't pass"?
    Feedback: Test_Print_Array class was missing


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

 

Lesson 10 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)
In-Class Exercises:

<Class Date: Wednesday, Dec 2 >

  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
    (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.

    For use in-class:
    Runtimes.xls
     
  7. Big "Oh" Notation (Mike's explanation - ignore the stuff that's specific to BIT 143)
    Big "Oh" Worksheet: Function Review
    Big "Oh" Worksheet: Practice Analyzing Time & Space TODO: Either go over the space thing, or else remove it

  8. Using .Net's Array.Sort, Array.Search 
    Feedback: Also cover Array.Copy?

Instructor's Materials:
Notes
Slides

Individual Pre-Class Exercises:
<Due: Wednesday, Dec 9, by 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)????
Feedback: Put in a note about what to do for the 'null?' tests
  1. 'Starter' project for the lesson 10 PCEs (Pre-Class Exercises)

  2. Sorting & Searching: setup for the class
  3. Linear Search
  4. Binary Search

  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: Be clear that the _FindIntegerBinary also needs to pass

  8. BubbleSort
    Video: BubbleSort (2008Sp)    BubbleSort( 2008 Winter)

  9. BubbleSort: Measuring Performance (Hand-In)

  10. PCE Feedback (Hand-In) (This will be graded)
     
  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

 

Lesson 11 - DRAFT (Until the 'DRAFT' marker is removed, this lesson may be changed!)

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

  1. Required Post-Course Evaluation :

     

  2. POST-course survey goes here DON'T FORGET TO DO THIS FOR BOTH 142 AND 143!!!!

  3.  <Final  Exam>

Instructor's Materials:
Slides

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

  1. Final Exam: List of Review Topics

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
Monday, Oct 5, by NOON Email the professor, so that the professor has your email address
Wednesday, Oct 7, by the start of class PCE 01
Wednesday, Oct 7, by the start of class Google Group: Sign yourself up, post a question, answer someone else's question:
Wednesday, Oct 14, by the start of class PCE 02
Wednesday, Oct 14, by the start of class A1 (initial version)
Wednesday, Oct 21, by the start of class PCE 03
Wednesday, Oct 28, by the start of class PCE 04
TBA A1 (final, revised version)
Wednesday, Oct 28, by the start of class A2 (initial version)
Wednesday, Nov 4, by the start of class PCE 05
Wednesday, Nov 11 MIDTERM  EXAM
Wednesday, Nov 11, by the start of class A3 (initial version)
Wednesday, Nov 11, by the start of class
(no penalty until Nov 18)
PCE 06                
Wednesday, Nov 18 by the start of class PCE 07
TBA A2 (final, revised version)
Wednesday, Nov 25, by the start of class A4 (initial version)
Wednesday, Nov 25, by the start of class PCE 08
TBA A3 (final, revised version)
Wednesday, Dec 2, by the start of class PCE 09
Wednesday, Dec 2, by the start of class Final Date To Hand In Any homeworks, revisions to homeworks, or PCEs (except PCE 10)
TBA A4 (final, revised version)
Wednesday, Dec 9, by the start of class PCE 10
Wednesday, Dec 9 FINAL  EXAM

 

Back to BIT 142's homepage

Unused Lecture Material  NUnit-ORIG Map

BIT 143's Lessons Page

 

NUnit for next time: drop recurrsion, use an entire lesson for NUnit, then push it out past the console stuff, and focus on returnvalues?+

 

 


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?