Lesson 02

Conditional Statements (if, if/else, switch), integer divison, modulus

Note: All due dates are listed on the main page for this course.  They are NOT listed here.

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)
      Online students will need to read these on their own. 
      Hybrid students will seem them at the start of class.
    2. 'Starter' project for the lesson 02 PCEs (Post-Class Exercises) (for use with Visual Studio 2013)
    3. Watch the online videos for this lesson and demonstrate your knowledge (Hand-In)
      Make sure that you include the appropriate file in the .ZIP file you hand in for this lesson (in either Word .DOC/.DOCX format or .PDF format).

  2. Conditional Statements
    This section will show you the basics of conditional statements, in the context of simple, console-based programs.

    1. VIDEO: If, If/Else

    2. VIDEO: Switch

    3. Exercise: Conditional statements  (Hand in)
      (If: Sect. 5.3 / If...Else: Sect. 5.4 / Switch: Section 6.6) 
    4. Exercise: Comparison Operators (Sect. 3.9) (they may also be called relational operators)
    5. Exercise: Console I/O, Operators (covered in previous readings) (Hand-In)
    6. Exercise: Comparing Strings (Sect. 16.5) 
  3. Integer Division

    1. VIDEO: Integer Division

    2. Exercise: Integer (and real) division (Hand-In)

  4. Modulus Operator

    1. VIDEO: Modulus (How does it work, mechanically)?

    2. VIDEO: Effective usage of the modulus operator

    3. Exercise: The Modulus operator ( % ) (aka the remainder operator) (Hand-In)

  5. Final Exercises

    1. Exercise: Fahrenheit to Celsius (Based on your previously acquired knowledge)  (Hand-In)
    2. Exercise: Logical operators (Section 6.8)  (Hand-In)
  6. Study Skills: Personal organization
    NOTE: This is a DEEP rabbit hole online.  It's important that you think about this, but don't get lost
    Objective: Find something that works well enough. Lets you get stuff done AND won't require too much work.
    Warning: in school you can often get by with a minimal/missing system because of weekly patterns. I.e., "BIT 142 is due every Monday".  White collar jobs don't work this way, so practice now!!
    I read "Getting Things Done" & loved it.  I recommend it (you can skip most of the book & focus on the two chapters that run you through the system)

    Need:
    Track stuff I need to do, but am not doing right this instant
    Track appointments (e.g., Google Calendar)

    Review this regularly

  7. Last 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.
      (There's a link to StudentTracker on the main page for this 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).

      1. VIDEO: Using StudentTracker

      2. VIDEO: How to .ZIP your homework into a single file

      3. Remember that you can use an extension to hand in your work slightly late (see the lecture 1 slides for details).
        Once you get the feedback (the grade) from the instructor you have a limited time to email your missing work to the instructor (make sure to tell the instructor that you're using an extension). 
        You can use an extension if you forgot to hand in the entire .ZIP file, and you can  use the extension if you forgot to include an entire, specific file.  You CANNOT use an extension to revise work that you submitted and got a grade on.

        This is true as long as you have extensions left; next week will be the last time that this notice is posted

    2. Make sure that you're working on homework assignment #1 (abbreviated A1).
      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 :)

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