teaching machines

CS 330 Lecture 16 – Polymorphism in C

Agenda what ?s finishing stack unions metaprogramming Think About This Code stack1.c stack1.h postfix.c stack3.c stack3.h makefile Note to copy and pasters: makefile rules need to be indented with real tabs, not spaces. Haiku

CS 245 Lab 6 – Recursion

First, if you have checkpoints left over from last lab, get them inspected during the first 15 minutes of this lab. No credit will be awarded past these 15 minutes. Work in pairs, where possible. Prefer working with someone that you did not work with last week. The exchange of new ideas and perspectives is […]

CS 245 Lecture 12 – Recursion

Agenda what ?s recursion finding a file binary search concentric circles terrain generation merge sort TODO I updated the HW2 PDF. Go to Bitbucket and sync with my repository. Pull the changes down in Eclipse. Start homework 2. Due before 3/14. Code FindFile.java TerrainGenerator.java ArrayUtilities.java Target.java Haiku

CS 330 Lecture 15 – Polymorphism in C

Agenda what ?s ezmalloc a postfix calculator void * program this unions metaprogramming TODO  Read chapter 7 through section 7.3 in the book. 1/4 sheet. EZMALLOC What do these malloc calls look like? Allocating space for 100 ints? Allocating space for 10 char *s? Allocating space for 1 struct foo_t? Postfix Program This Code ezmalloc.h […]

CS 245 Lecture 11 – Recursion

Agenda what ?s name that complexity recursion char multiplication concentric circles find file file explorer binary search brute force password cracking tournament bracket drawing terrain generation TODO Write a recursive method isOdd that has base cases for 0 and 1 and a general case for all other positive numbers. 1/4 sheet. Name That Complexity Code […]

CS 330 Lecture 14 – Jeff’s Malloc

Agenda what ?s finish jmalloc what happens when TODO Optional: check out the section of the C FAQ on memory allocation: http://c-faq.com/malloc/index.html. Really optional: check out the GNU implementation of malloc. What Happens When… You malloc but you don’t free? You write beyond your allocation? You free a pointer twice? You free memory that’s not your […]

CS 245 Lab 5 – Binary Search

First, if you have checkpoints left over from last lab, get them inspected during the first 15 minutes of this lab. Work in pairs, where possible. Prefer working with someone that you did not work with last week. The exchange of new ideas and perspectives is not an opportunity you want to rob yourself of. […]

CS 330 Lecture 13 – DIY Malloc

Agenda what ?s enums in Java making a path from a directory and file name implementing malloc TODO Read up on scope and bindings in chapter 3 through section 3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3. 1/4 sheet. Code Rank.java CardUtilities.java file_stuff.c jmalloc.h jmalloc.c Haiku

CS 245 Lecture 10 – Binary Search and Recursion

Agenda what ?s think about this computational complexity binary search implementation recursion times(char, int) isEven file finding binary search TODO Read chapter 5 through section 5.3 in Data Structures. The reading may be useful in the next lab. Write a recursive method that paints a Target logo—a red circle around a smaller white circle around […]

1 2 3