Basic Stacks and Circular Queues

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

Individual Post-Class Exercises - 2018 WINTER ORIGINAL
  1. Lesson Setup

    1. Start-of-lecture Slides (Required)

    2. Starter' project for the lesson 03 PCEs
       
      1. The above link provides a starter project that works with VS 2019 and .Net Core (.Net 5, really).
        In case that doesn't work I'm going to leave a link to the previous version of the starter project here.
        ONLY DOWNLOAD THIS IF YOU HAVE PROBLEMS WITH THE ABOVE PROJECT
    3. Watch the online videos for this lesson and demonstrate your knowledge (Hand-In)
      You can download a .ZIP of all the videos for this lesson from Microsoft's OneDrive website by opening the folder (click this link to open the folder), then clicking on the "Folder Actions" menu, then clicking on the "Download Folder" menu item.

  2. Unit Testing With the NUnit Framework: Testing your weekly work

    1. The goal for this section is to switch to using NUnit and the autograder to test your normal, weekly, PCE code.
      This is done by building on the NUnit coverage from the previous two lessons.
    2. This same slide stack is used by all the NUnit videos:
      Slides (used in the following NUnit videos)
      1. One really good way to use these slides is to skim/read through thrm to get an idea of what's in each video.  For example, if you wanted to remind yourself how to get the tests working (which was covered in the prior lesson you might flip through those slides again.  If you need more detail you can then watch the video, or not)
    3. Download a copy of the feedback form and read through it.  You must hand in a copy of this form with whatever feedback you can provide.
      1. In general, I want to check that this activity can be done and that the course materials clearly explains what you need to do. 
        All feedback is appreciated, but I particularly want to check that the activity is doable and the materials clear.
      2. A smaller amount of Insightful feedback is better than a huge volume of space-filling feedback
    4. VIDEO:  (6:13)
      OneDrive: How To Calculate Your Grade
      DropBox: How To Calculate Your Grade
    5. VIDEO:  (4:31)
      OneDrive: Suggested Workflow
      DropBox: Suggested Workflow
    6. You may have trouble getting the tests to show up and/or getting them to run.
      If so, please refer back to the advice in Lesson 01.  In particular, the video for How To Get NUnit3 To Work In Visual Studio (and the corresponding slides in the  NUnit slide deck) can be very helpful.

      NOTE: This may (or may not) happen every Lesson (every time you download a new project)
  3. Review: Inheritance in Object Oriented Programming

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

  4. ADT: Stack
    Note: The Stack, Queue, and SmartArray exercises were changed to use exception handling - let me know ASAP if there appears to be any errors.

    1. VIDEO:
      OneDrive: Stacks: ADT, Examples
      DropBox: Stacks: ADT, Examples
    2. VIDEO:  
      OneDrive: Stacks: API, Implementation
      DropBox: Stacks: API, Implementation
    3. Exercise: StackOfInts as specialized SmartArray (Hand-In)

  5. ADT: Queue
    Note: The Stack, Queue, and SmartArray exercises were changed to use exception handling - let me know ASAP if there appears to be any errors.

    1. VIDEO:
      OneDrive: Queue: API, Implementation
      DropBox: Queue: API, Implementation
    2. Exercise: QueueOfIntegers as specialized SmartArray (Hand-In)

    3. Exercise: Stack / Queue: Annotate with Running Time (Hand-In)

  6. Dynamic Memory Allocation
    Note: The Stack, Queue, and SmartArray exercises were changed to use exception handling - let me know ASAP if there appears to be any errors.

    1. Exercise: SmartArray: Manually resizing (Hand-In)

  7. git and GitHub

    1. Link to access the project for this assignment in GitHub
    2. Exercise: Review git,GitHub, Visual Studio with C# arrays (Hand-In)
    3. Exercise: Adding a file to git, using VS on your computer (Hand-In)
    4. At this point YOU MUST PUSH (UPLOAD) YOUR WORK TO GITHUB!!!(Required)
      If you skip this step then you'll run into problems on the 'pull' step, below!!!
    5. Exercise: Adding a file to in GitHub (Hand-In)
    6. Create and commit a file which tells me your name (Hand-In)
      Please create a text file in Visual Studio (or NotePad/Text Editor/etc) and please name the file LASTNAME, FIRSTNAME.txt, where LASTNAME is replaced with your last name and FIRSTNAME is replaced with your first name (based on how you registered at Cascadia).
      This will enable me to know who you are even if it's not clear from your GitHub username.

    7. Exercise: Pull (download) your work from GitHub (Hand-In)
  8. Extra Credit
    I'm thinking about switching from NUnit to MSTest. 
    They're so close that they're almost identical, but MSTest is made by Microsoft and I'm wondering if it'll "just work" without the troubleshooting that NUnit seems to need.

    I think that MSTest will work on Windows, Mac, and Linux as long as we use the cross-platform '.Net Core' version of MSTest. 

    In order to get 5 points of extra credit you will need to install .Net Core, then run the tests. 

    Here are the instructions:

    1. Install the .Net Core add-on to Visual Studio
      IN ORDER TO GET THE EXTRA CREDIT YOU NEED TO INCLUDE A SCREENSHOT OF THE INSTALLER, SHOWING THE CHECKED-OFF OPTION TO INSTALL '.NET CORE CROSS PLATFORM DEVELOPMENT'.  These instructions will walk you through how to do that.

    2. Download this project
      NOTE: this is separate from the starter project listed above. 
      If you take a screenshot of the wrong project you will NOT get the extra credit points

    3. Extract it

    4. Open it

    5. Open up the Test Explorer window (just like you did with NUnit) and click 'Run All'

    6. Wait about 5 seconds for Visual Studio to find the tests and run them
      If that doesn't work then click the 'Run All' button/link in the Test Explorer window to tell VS to run the tests.
      NOTE: most of the tests will fail and that's fine.
      NOTE: If VS does _not_ find the tests that's also fine - I just want to see if this works better than NUnit or not.

    7. Grab a screenshot that includes the Test Explorer window
      You should see the tests, and after the tests have been run you should see a green or red dot next to each of them (which shows that the tests have been run).

    8. Put BOTH screenshots (the first shows that you installed .Net Core, the second shows the results of running the MSTests on .Net Core) into a Word .DOCX file -OR- a .PDF.  Make sure the file is named MS_TEST_RESULTS.docx (or .pdf).
      (Note - I don't really care what the file is named I just want to be able to find it quickly and easily.  As long as it's clear which files contains the images then I'm fine)

    9. Make sure to include that file(s) in the .ZIP that you upload for this lesson

  9. Last Steps

    1. Hand in your work:

    2. Please follow the instructions listed here to hand in the starter project for the overall Lesson.
      (These instructions are for BIT 142 specifically, but they should make sense for this class, too)

      MAKE SURE THAT YOU INCLUDE THE 'PLACEHOLDER' FILE FOR INSTRUCTOR FEEDBACK, and that you upload this file directly to Canvas.
    3. Starting with this lesson you can no longer use Missing File Extensions to hand work in late.
      Instead, you can hand in your work for a 'Regrade', which is typically graded around the time of the next exam (midterm or final)(please check Canvas for the exact due date & time)
      You can hand in any work that you want graded a second time, and your final grade will be the higher of your original grade and the regrade.

    4. 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.
    5. 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.

Git

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):

Extra Credit stuff from 2018 Winter

Extra Credit #3
  1. Download a copy of the feedback form and read through it.
    1. In general, I want to check that this activity can be done and that the course materials clearly explains what you need to do. 
      All feedback is appreciated, but I particularly want to check that the activity is doable and the materials clear.
  2. Redo PCE 03 coding exericse using the autograded unit tests
    (My hope is that this shouldn't take too too long, since you've already done the exercises back in Lesson 03)

    (You do NOT need to redo the Viewing Quiz, nor the exercise about marking things up with their Big Oh running time)

    The autograded version of PCE 03 is listed below this block

    In order to do this you'll need to:
    1. Download a new copy of the starter project (since that one actually contains the NUnit tests)
    2. Redo the exercise for the Stack class, making sure that the tests listed in the exercise all pass.
    3. Redo the first exercise for the Queue class, making sure that the tests listed in the exercise all pass.
    4. Redo the exercise for the SmartArray class, making sure that the tests listed in the exercise all pass.
  3. Hand in the feedback form and any other files that you did work in.
    1. List of files that you need to hand includes but may not be limited to:
      1. Student_Answers.cs
      2. The feedback form
    2. There will be an option in StudentTracker labled "NUnit Extra Credit  #3"
      PLEASE HAND THIS IN TO THE #3 SLOT!!
    3. You have until 11am on Wednesday, March 7th to hand this in.
    4. You can keep handing this in until I finish grading it (and send out the feedback).
    5. You CANNOT use a 'missing file extension' for this (because it's extra, it's above and beyond, and therefore it's not part of the required work for the class)
Extra Credit #1

Additional NUnit Material

  1. FOR 5 points of extra credit:
    1. Download a copy of the feedback form and read through it.
      1. In general, I want to check that this activity can be done and that the course materials clearly explains what you need to do. 
        All feedback is appreciated, but I particularly want to check that the activity is doable and the materials clear.
    2. Watch the above videos
    3. Download the Starter project and get Visual Studio to show you all the tests
      1. Do this by following the instructions in the 'How To Install The NUnit3 Visual Studio Extension' video and/or do whatever else is needed to in order to get Visual Studio's Test Explorer to show you the list of tests.
      2. Once you've done that, fill out the questions in the 'Getting NUnit3 (and the Test Adapter) to work in Visual Studio:' section of the feedback form.
      3. Grab a screenshot that shows the tests and paste it into the section of hte feedback form entitled "Screenshot of NUnit3 Working in Visual Studio"
        (NOTE: it's fine that the tests mostly failing :)  )
    4. Fill out the general feedback part of the feedback form
    5. Hand in the feedback form.
      1. There will be an option in StudentTracker labled "NUnit Extra Credit 1"
      2. You have until 11am on Wednesday, Feb 28th to hand this in.
      3. You can keep handing this in until I finish grading it (and send out the feedback).
      4. You CANNOT use a 'missing file extension' for this (because it's extra, it's above and beyond, and therefore it's not part of the required work for the class)