1
Spanning Trees
Lecture 21
CS2110 Spring 2016
Spanning trees
2
What we do today:
Calculating the shortest path in Dijkstras
algorithm
Look at time complexity of shortest path
Definitions
Minimum spanning trees
3 greedy algorithms (including Kruskal & Pri
RECURSION
Lecture 8
CS2110 Fall 2016
Overview references to sections in text
2
Note: Weve covered everything in
JavaSummary.pptx!
What is recursion? 7.1-7.39 slide 1-7
Base case 7.1-7.10 slide 13
How Java stack frames work 7.8-7.10 slide 28-32
Flipping th
Searching and Sorting
Hint at Asymptotic
Complexity
Lecture 10
CS2110 Spring 2016
Miscellaneous
2
A3 due Monday night. Group early! Only
379 views of the piazza A3 FAQ. Everyone
should look at it.
Pinned Piazza note on Supplemental study
material. @472. C
PRIORITY QUEUES
AND HEAPS
Lecture 17
CS2110 Spring 2016
Readings and Homework
2
Read Chapter 26 A Heap Implementation to learn
about heaps
Exercise: Salespeople often make matrices that show
all the great features of their product that the
competitors pro
Lecture 21
Programming
with Subclasses
Announcements for Today
Reading
Assignments
Today: See reading online
Tuesday: Chapter 7
Prelim, Nov 12th 7:30-9:00
Material up to Today
Review has been posted
Recursion + Loops + Classes
S/U Students are exem
Lecture 20
Subclasses &
Inheritance
Announcements for Today
Reading
Assignments
Today: Chapter 18
Online reading for Thursday
A4 graded by end of week
Prelim, Nov 12th 7:30-9:00
A5 was posted Friday
Material up to Thursday
Review posted on Thursday
Lecture 19
Using Classes Effectively
Announcements
Reading
Regrades
Tuesday: Chapter 18
Thursday reading online
Today is last day to request
Show it to me after class
I will verify if it is valid
Then request regrade in CMS
Assignments
Prelim, Nov
Lecture 17
Classes
Announcements for This Lecture
Prelim and Regrades
All Prelims are all done
Assignments/Reading
Should be working on A4
Solutions are now posted
Tasks 1-2 by tomorrow
Make-ups graded too
Task 3 by the weekend
Recursion next week
Lecture 18
Methods and Operations
Announcements for This Lecture
Assignments
Lab this Week
A4 Due Thursday at midnight
Hopefully you are on Task 4
Extra consultants available
Simple class exercise
Fill in predefined methods
Setting you up for A6
Wi
Lecture 13
For-Loops
Announcements for This Lecture
Reading
Assignments
A2 has been graded
Today: Chapters 8, 10
Thursday: Chapter 11
Prelim, Oct 15th 7:30-9:00
Material up to TODAY
Study guide is posted
A3 is due on FRIDAY
Review next Wednesday
Graphs - II
CS 2110, Spring 2016
1
Where did David leave that book?
2
http:/www.geahvet.com
Where did David leave that book?
3
http:/www.geahvet.com
Where did David leave that book?
Go as far down a path as
possible before backtracking
Depth-First Search
THERE IS ROOM IN THE BALCONY!
Romeo, Romeo, where art thou!
Up in the balcony, where its cheaper!
CS/ENGRD 2110
FALL2017
Lecture 1: Overview and intro to types
http:/courses.cs.cornell.edu/cs2110/2017fa
Welcome to CS2110!
OO Programming and Data Structure
1
CS/ENGRD 2110
FALL 2017
Lecture 5: Local vars; Inside-out rule; constructors
http:/courses.cs.cornell.edu/cs2110
Announcements
2
1.
2.
3.
Writing tests to check that the code works when the
precondition is satisfied is not optional.
Writing assertions t
RECURSION
Lecture 8
CS2110 Fall 2017
Five things
2
Note: Weve covered almost
everything in Java! Just a few
more things, which will be
covered from time to time.
Prelim 1 is in 2 weeks
(Thurs 28 September, 5:30,
7:30)
Visit exams page of course
website to
CS/ENGRD 2110
FALL 2017
Lecture 7: Interfaces and Abstract Classes
http:/courses.cs.cornell.edu/cs2110
1
Announcements
2
A2 is due tomorrow night (17 February)
Get started on A3 a method every other day.
Time to do A1:
356/416 groups gave the time.
Mean:
1
CS/ENGRD 2110
FALL 2017
Lecture 6: Consequence of type, casting; function equals
http:/courses.cs.cornell.edu/cs2110
Overview ref in JavaHyperText
2
Quick look at arrays array
Casting among classes cast
Operator instanceof
Function getClass
Function
1
CS/ENGRD 2110
FALL 2017
Lecture 3: Fields, getters and setters, constructors, testing
http:/courses.cs.cornell.edu/cs2110
Object-Oriented Programming
2
Classes
Objects
House (houz) n. An object that
Can create many objects from
the same plan (class). Us
1
CS/ENGRD 2110
FALL2017
Lecture 4: The class hierarchy; static components
http:/cs.cornell.edu/courses/cs2110
Announcements
2
A0, HW1 due tonight
Next weeks recitation: loop invariants
for ( ) cfw_
You do some
stuff first
You hope
something is
true
How
9/19/17
Prelim one week from Thursday
1. Visit Exams page of course website, check what time
your prelim is, complete assignment P1Conflict ONLY
if necessary. So far 54, people completed it!
2. Review session Sunday 1-3. Kimball B11. Next
weeks recitation
1
SHORTEST PATHS
READINGS? CHAPTER 28
Lecture 20
CS2110 Spring 2016
About A6
2
We give you class ArrayHeaps for a reason:
It shows the simplest way to write methods like
bubble-up and bubble-down. It gives you a method
to get the smaller child.
You can wr
Graphs - I
CS 2110, Spring 2016
Announcements
Reading:
Chapter 28: Graphs
Chapter 29: Graph Implementations
These arent the graphs were interested in
These arent the graphs were interested in
This is
V.J. Wedeen and L.L. Wald, Martinos Center for Biome
CS2110.
GUIS: Listening to
Events
Also
anonymous classes
A3 is now open for regrades.
Until 4 April
Download the demo zip file
from course website and
look at the demos of GUI
things: sliders, scroll
bars, combobox listener,
1
Making use of the recursive
Lecture 16
More Recursion
Announcements for This Lecture
Prelim 1
Prelim 1 back today!
Assignments and Labs
Need to be working on A4
Pick up in Lab Section
Solution posted in CMS
Mean: 80, Median: 83
What are letter grades?
10/20/15
A bit too early
Lecture 15
Recursion
Announcements for Today
Prelim 1
Tonight at 7:30-9pm
AJ (Uris G01)
Other Announcements
Reading: 5.8 5.10
Assignment 3 now graded
Mean 94, Median 99
Time: 7 hrs, StdDev: 3 hrs
Unchanged from last year
K-Z (Statler Auditorium)
Lecture 14
More with Sequences
Announcements for This Lecture
Readings
Assignments
A3 is due tomorrow
Today: Chapter 11
Next Week: Sec. 5.8-5.10
Turn in before you leave
Prelim, Oct 15th 7:30-9:00
Opportunities for help
Consultants 4:30-9:30
Wil h
CS2110. Spring 2017
Exception-handling problems
1
Lini Tan (lt398)
The purpose of this problem set is for you to get practice. As long as this is a good attempt, with most things
right, you get 100%. Feel free to do this with one or two other people,