Lesson 06

Objects as parameters & return values; Arrays inside objects

Individual Post-Class Exercises
  1. Lesson Setup

    1. Start-of-lecture Slides

    2. 'Starter' project for the lesson 06 PCEs (Post-Class Exercises)
      NOTE: This week's PCEs are to be handed in individually, regardless of what's said in any of the videos

    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. Objects As Parameters And Return Values:

    1. Exercise: Define the Television class (Hand-In)
      (Feel free to copy-and-paste this from the prior lesson; you may need/want to modify this further during this lesson)
      Since you've already got a Television class you don't need to create a second Television class

    2. VIDEO: Passing an object to a method (objects as parameters)  (Example Project)

    3. VIDEO: Objects are passed (as a parameter) by reference (Example Project)

    4. Exercise:Passing a basic object to a method

    5. VIDEO: Return an object from a method (objects as return values)

    6. Exercise: Passing two objects to a method, then returning one of them (Hand-In)
  3. Array Inside Of A Class

    1. VIDEO: Class with an array of Double values inside it (GradeTracker)( Example Project)
      (Note: this link goes to the file that's inside the PCE 06 folder.  There's ALSO a copy of this file inside the PCE 06 folder)

    2. VIDEO: Class with an array of Object References inside it (PointTracker)
      (Note: this link goes to the file that's inside the PCE 06 folder.  There's ALSO a copy of this file inside the PCE 06 folder)

    3. Exercise: Mixing Arrays and Classes: An array of simple types within a class  (Previous Knowledge)  (Hand-In)
    4. VIDEO: Class with an array of Object References inside it WITH NULL VALUES (PointTracker)(Note: this link goes to the file that's insi
      de the PCE 06 folder.  There's ALSO a copy of this file inside the PCE 07 folder)

    5. Exercise: 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) )

  4. 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:
Videos recorded during class (of the In-Class Exercises):