-
Lesson Setup
-
Start-of-lecture
Slides
(Required)
-
'Starter' project
for the lesson 06 PCEs (VS 2015/2017)
-
Please use this
link to access the repo with the 'Starter' project for
lesson 06 PCEs (VS 2017/2019)
-
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 "Download" menu
item.
-
Recursion:
Figuring Out
What Existing,
Recursive Code
Does
-
VIDEO:
OneDrive:
Tracing through recursion
DropBox: Tracing through recursion
-
Humor:
Gru
(from
Despicable
Me) explains
an
easy-to-make
mistake
with
recursion
-
Exercise:
Recursion By
hand: Warm-up #1
(Link
to the exact
same code,
in an
easy-to-print
page
NOTE: This
is in an MS
Word file)
-
Exercise:
Recursion
By hand: Warm-up
#2
(Hand-In)
You can hand
this in
however you
want - take
a picture
using your
phone & hand
in the image
file, do the
work in Word
directly, do
the work in
something
like MS
Paint (or
the
superior,
free
alternative,
Paint.Net),
etc, etc)
(Link
to the exact
same code,
in an
easy-to-print
page
NOTE: This
is in an MS
Word file)
-
Exercise:
Recursion
By hand: Warm-up
#3
(NOTE: This
is in an MS
Word file,
and is ONLY
available in
a single,
easy-to-print
page)
-
Exercise:
Recursion By
hand: More
Complicated
(NOTE: This
is in an MS
Word file,
and is ONLY
available in
a single,
easy-to-print
page)
-
Recursion:
Writing Your
Own, Recursive
Code
-
WARNING:
Please be
very careful
that your
recursive
functions
stop at some
point.
If your code
creates a
Stack
Overflow
Exception
(because it
never stops
recursing)
then NUnit
will crash.
(There will
be a point
penalty for
code that
crashes like
this).
-
VIDEO:
OneDrive:
Writing recursive code: Basic approach
DropBox: Writing recursive code: Basic approach
-
VIDEO:
OneDrive:
Writing recursive code: PowR example
DropBox: Writing recursive code: PowR example
-
Exercise:
Recursively
Printing Numbers
1 - 10
-
Exercise:
Recursively
Printing Even
Numbers
(Hand-In)
-
Exercise:
Recursive Power
Function
-
Exercise:
Recursive
Multiplication
(Hand-In)
-
Exercise:
Write Factorial
-
Exercise:
Fibonacci
Numbers (And
Arrays!)
-
Exercise:
Print a singly
linked list
recursively (Hand-In)
-
Last Steps
-
Hand in
your work:
Starting
with this
lesson you
must hand in
your work
via GitHub.
-
Don't
forget
to
commit
your
Viewing
Quiz/Video
Outline
to your
repo on
GitHub.com
Since
you're
handing
in all
your
work
through
git/GitHub
this
week
you'll
need to
add your
Viewing
Quiz/Video
Outline
to your
GitHub
repo.
You can
do this
through
Visual
Studio
(and
then
push it)
or
through
GitHub.com
directly
- as
long as
it gets
handed
in
either
way is
fine
-
Create
and
commit a
file
which
tells me
your
name
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.
-
You do
NOT need
to hand
in an
INSTRUCTORFEEDBACK.docx
file
when
handing
in work
via
GitHub.
It
doesn't
hurt if
you do
so feel
free to
do so if
you'd
like to.
I'm
going to
ignore
any that
are
there.
-
How to get
your
feedback
from GitHub:
NOTE:
Getting your
feedback
won't
change, so
this is the
last week
that I'm
posting
instructions
about how to
do this
For the
weekly
exercises
that you
submit
through
GitHub
you'll need
to open an
.HTML file
to see your
feedback.
We can't do
this
directly in
GitHub so
you'll need
to download
it first,
and then
open it on
your local
computer.
-
You
should
see a
file a
name
similar
to
"<YourName>,
-, PCE
05,
2020-05-07_06-11-28.html"
in your
repo.
Click on
this to
open it
in
GitHub.
-
Once
you're
on the
page for
the
.HTML
file
find the
'Download'
button
(on the
right
side,
near-ish
to the
top)
-
Download
it and
open it
in a
browser
you
should
be able
to see
the
feedback.
-
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)!
|