teaching machines

CS 330 Lecture 27 – Goodbye, Generics and a Base Calculator

Agenda what ?s two kinds of polymorphism Java’s approach to generics our first grammar/interpreter TODO Walk through https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4. Read chapter 2 through section 2.1 in the book. Also read section 2.3. 1/4 sheet. Code Basecalc.g

CS 330 Lecture 26 – Reference Counting and Templates

Agenda what ?s reference-counted garbage collection a smart pointer subtype polymorphism vs. parametric polymorphism the difference between generics and templates Think About This Code SharedPointer.h test_shared.cpp Haiku

CS 245 Lecture 19 – Snake

Agenda what ?s Snake with ArrayList linked structures TODO I’ve reduced the grading scale by a couple of points. There are still 18 Blugolds available. Code HashSet.java SnakesOnAFrame.java Haiku

CS 330 Lecture 25 – A Compiler That’s For You

Agenda what ?s what’s wrong with this? think about this a reference-counted pointer What’s Wrong With This? What Does This Do? Think About This Code SVector.cpp foo.cpp Haiku

CS 245 Lecture 18 – Snake

Agenda what ?s a snake game hashset and iterator different kinds of lists TODO Homework 3 is posted. Due before April 16. Read sections 2.5-2.7 in Data Structures. 1/4 sheet. Tasks for Snake? How do we manage eggs? Generate and draw eggs. Handle cursor events. How do we manage snake? Draw snake. How do we […]

CS 330 Lecture 24 – Templates

Agenda what ?s program this a templated vector class overloading builtin operators TODO Read section 7.7.3 in your book. Wondering about Java’s garbage collection? Read http://www.ibm.com/developerworks/library/j-jtp10283/. Why do we need both delete and delete[]? Check out http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=287. 1/4 sheet. Program This Code QVector.h vector_test.cpp Haiku

CS 330 Lecture 23 – Inheritance vs. Composition, Iflessness

Agenda what ?s inheritance vs. composition a raffle Game of Life without conditionals Code raffle.cpp life_sans_if.cpp Haiku

CS 245 Lecture 17 – Hashing Implications

Agenda what ?s what does this do? requirements of a key hashes in other languages think about this TODO Trivia time! Why must a hashmap’s array sometimes be of a length that’s a prime number? What is the name of the hashmap class that Apple includes in their standard library for Objective-C? Who invented the […]

CS 330 Lecture 22 – Vtables and Other C++isms

Agenda what ?s O(1) dynamic dispatch Game of Life with conditionals overloading builtin operators copy constructor formatted output with stringstream references TODO Optional participation point: write Game of Life without conditionals. Code Sizeof.cpp life.cpp Haiku

CS 245 Lecture 16 – Hashing

Agenda what ?s hashing implementing a hashtable the requirements of a key TODO Start and finish preassignment 2. Thailand is in upheaval. Sync on Bitbucket, and pull in Eclipse to get an updated SpecChecker. Code HashTest.java HashMaster.java StateQuiz.java Haiku

1 78 79 80 81 82 110