Lesson 04

Nested loops and arrays

Individual Post-Class Exercises
  1. Lesson Setup
    This is stuff you'll need to download and/or browse before starting this lesson

    1. Start-of-lecture Slides (Required)

    2. Starter project for the lesson 04 PCEs (Post-Class Exercises)

    3. Watch the online videos for this lesson and demonstrate your knowledge (Hand-In)
      Download all videos for this lesson (Use the 'Download' menu item)

  2. Parameters

    1. VIDEO: Basic Parameters
           (This link may (or may not) be useful: http://csharp.net-tutorials.com/basics/functions/)

    2. Exercise: Basic Parameters (Sect. 4.4) (Hand-In)
    3. Exercise: Printing numbers, w/ params (Sect. 4.4)

  3. Return Values

    1. VIDEO: Basic Return Values

    2. Exercise: Return Values (Hand-In
      (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#) )
  4. Arrays

    1. VIDEO: Q + A: String Comparison with ==, String.Compare

    2. VIDEO: Basic Array of Primitive Types

    3. VIDEO: How To Adjust The Console's Buffer Size (so you can see program output text that has scrolled off the screen)

    4. Exercise: Arrays: Basics (Sect. 8.1, 8.2)
    5. Exercise: Arrays: Usage (Sect. 8.3)
    6. Exercise: Arrays: Using only part of the array (Previous Knowledge) (Hand-In
  5. Using Arrays As Parameters And Return Values

    1. VIDEO: Arrays as Parameters (syntax)

    2. VIDEO: Arrays as Parameters (pass by reference vs. pass by value)

    3. Exercise: Passing arrays to functions (Sect. 8.7, 8.8) (Hand-In)

    4. VIDEO: Arrays as return types

    5. Exercise: Returning an array from a method  (Hand-In)
    6. Exercise: Fibonacci numbers in an array (Previous Knowledge)
              (Fun link: Fibonachos)
  6. Review: Nested Loops

    1. Exercise: Nested Loops: Square of Numbers (Sect. 5.8) (Hand-In)
      Note: This should be very similar to Lesson 03 Exercise #10 
    2. Exercise: Nested Loops: Square of Numbers with parameters & return values (Sect. 5.8) (Hand-In)
      Note: This should be very similar to Lesson 03 Exercise #9 
  7. Review Exercises
    These may or may not require you to remember topics from prior lessons.

    1. Exercise: Detecting Prime Numbers (Previous Knowledge)
    2. Exercise: More Practice With Parameters, Return Values (Sect. 4.4)  (Hand-In
  8. Final Steps

    1. Web Hand-In for post-class exercises and for homework:
      Go to the StudentTracker  web app, and create an account for yourself, and then "enroll" in the course.
      Please submit a .ZIP (and ONLY a .ZIP - not a .RAR, .7z, etc) that contains the Program.cs file, the video outline/viewing quiz .DOCX (or .PDF), any other files you wish to include, and leaves out every thing else (as much as possible).

    2. Make sure that you're working on the next homework assignment. 
      Details are listed on the
      homework assignment page
      The due date is listed on the main page.
    3. Practice what you've learned
      Remember that in order to really learn this stuff you're going to need to practice it.  Go back and redo the exercises from this lesson until you've really got it down.  Go back to the prior lesson(s) and review and redo that.  Make sure that you've really got this stuff in your head (and remember that it gets easier each time you redo the work)!
 
In-Class Materials:

These materials are used by students in the hybrid class during leture time.  Online students can safely ignore everything in this 'In Class Materials' box.

In-Class Materials:

Instructor's Materials:

  • Notes

    • These notes are for the instructor’s use, and not meant for public consumption.
      They're posted here on the off chance that you find them useful - If they help you, that’s great.  If not, please just ignore them :)
      This is the last week that this notice will be posted.

Videos recorded during class (of the In-Class Exercises):