-
Lesson Setup
-
Start-of-lecture
Slides
(Required)
-
Starter'
project for
the lesson
03 PCEs
- 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
-
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.
-
Unit
Testing With the
NUnit Framework:
Testing your
weekly work
- 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.
- This
same
slide
stack
is
used
by
all
the
NUnit videos:
Slides (used in the following NUnit videos)
- 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)
-
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.
- 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.
- A smaller amount of Insightful feedback is better than a huge volume of space-filling feedback
-
VIDEO:
(6:13)
OneDrive:
How To
Calculate
Your
Grade
DropBox: How To
Calculate
Your
Grade
-
VIDEO:
(4:31)
OneDrive:
Suggested
Workflow
DropBox: Suggested
Workflow
-
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)
-
Review:
Inheritance in
Object Oriented
Programming
-
OOP Inheritance
(Specialization): (Demo
Video Example Project)
-
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.
-
VIDEO:
OneDrive:
Stacks: ADT,
Examples
DropBox:
Stacks: ADT,
Examples
-
VIDEO:
OneDrive:
Stacks: API,
Implementation
DropBox:
Stacks: API,
Implementation
-
Exercise:
StackOfInts as
specialized SmartArray
(Hand-In)
-
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.
-
VIDEO:
OneDrive:
Queue: API,
Implementation
DropBox:
Queue: API,
Implementation
-
Exercise:
QueueOfIntegers
as specialized
SmartArray (Hand-In)
-
Exercise:
Stack / Queue:
Annotate with
Running Time (Hand-In)
-
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.
-
Exercise:
SmartArray:
Manually
resizing
(Hand-In)
- git and GitHub
-
Link to
access the project for this assignment in GitHub
- Exercise:
Review
git,GitHub, Visual Studio with C# arrays
(Hand-In)
- Exercise:
Adding a
file to git, using VS on your computer
(Hand-In)
- 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!!!
- Exercise:
Adding
a file to in GitHub
(Hand-In)
-
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.
- Exercise:
Pull (download) your
work from GitHub
(Hand-In)
-
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:
-
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.
-
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
-
Extract it
-
Open it
-
Open up the
Test
Explorer
window (just
like you did
with NUnit)
and click
'Run All'
-
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.
-
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).
-
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)
-
Make sure to
include that
file(s) in the
.ZIP that
you upload
for this
lesson
-
Last Steps
-
Hand in
your work:
- 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.
-
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.
-
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.
-
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)!
|