Computer Science 151

Data Structures

Spring 2022

 

Me:

Bob Geitz, King 125

bob.geitz@oberlin.edu

Office Hours:

MWF 11-12,
Thursday 1:30-3,
or by appointment

I am available most of the day when I am not in class.

Dylan:

Dylan McKay, King 120B

dmckay@oberlin.edu

Office Hours:

 

Tuesdays 3-5

 Overview

The content picks up where 150 left off, but the expectations are significantly higher. We will use Java rather than Python, and you will be expected to pick up the Java language quickly. You will find the labs are longer and require more thinking. You will learn to test and debug while you code rather than putting testing off to the very end. You will need to read the textbook. This is the course where you will start to become more professional in the way you approach programming tasks. Our majors report that on job interviews the bulk of the questions they are asked deal with material covered in CS 151.


Learning Goals


Textbook:

Data Structures & Problem Solving Using Java (Fourth Edition) by Mark Allen Weiss; Addison Wesley, 2010. You should read large portions of this over the course of the semester.

 


OWLS:

There will be two OWLS for this class:Lucas Draper (he/his) and Sagana Ondande (he/his). Lucas is a third-year CS major who is also minoring in in Math and Theater. Sagana is a fourth-year DD student who is majoring in CS and Vocal Performance. Each week there will be OWL sessions where Sagana and Lucas answer questions about the class material and provide additional exercises to deepen your understanding.

 


Exams and Grading:

We will have 2 in-class exams during the semester and a comprehensive final exam. Here is how the grades for the course will be composed:

Note that the final exam will be Wednesday, June 1 at 9 AM. This time is set by the Registrar and I cannot change it for the class or for individuals. If you have issues with this time you should talk to the AARC immediately.

The Labs

We will not have prelabs this semester. They are great in 150; I haven't found them to be helpful in 151. Each week the lab sessions will be on Monday and Tuesday; the labs will be due by 6PM on the following Sunday. Keeping up with the labs is even more important in this class than it was in 150. You will find it difficult to do the work of a lab until you have completed the previous labs. On the other hand, some people find this class overwhelming. You do not need to do all of the labs to pass the course. If you fall behid, talk to me; it may be more useful for you to finish older labs than to start something new.

Labs 0, 1, and 2 you need to do on your own; the remaining labs allow partners. On a partnered lab you may (you are not required to) work with one other partner on the entire lab. If you do this, the two of you should hand in only one copy of your solutions, with the names of both partners clearly indicated on every code file. It is an Honor violation to hand in joint code as your own.

Late Labs

Labs are due on Sundays at 6pm. I try to give them to the graders on Monday afternoon. I am too lazy to sort through the timestamps, so I count as on time anything that is handed in before I send the work to the graders. Anything that comes in after that is automatically docked 5 points (out of 50). Anything that comes in more than a week late is docked 10 points. There are no other deductions for lateness.

Resources

There are lots of ways to get help with this class. One is by talking to me. I am around just about all day Monday-Friday. This is the only class I am teaching this semester. You are welcome to talk to me outside of my posted office hours, but it might help to let me know you are coming. In addition to the student helpers during the lab there are also evening and weekend lab helpers who can help you with the labs. If you feel that an individual tutor would help you with the class, talk to me and I can help you get one. And, of course, there are our wise old OWLs.

The Honor Code

The Honor Code has a straightforward application to this class. On all of the exams you are responsible for your own work; you may neither give nor receive any information during the course of the exam. If someone takes an exam at a different time than the rest of the class there may be no communication concerning the exam between that person and anyone else in the class, not even whether the exam was easy or difficult. The atmosphere is much more relaxed for the lab assignments. You may discuss the labs, including details of the programming code, with anyone else in the class, but in the end you must write your own code. Or if you are working with a partner, you and your partner must write and sign the code you hand in. Making a copy of someone else's code and handing it in as your own, even if you change the names of the variables in the program, is a violation of the Honor Code. You should be learning to think structurally about code, so talk to anyone about functionality and then write the code yourself.

Course outline:

Week Day Topic/Reading HW/Labs
Week 1

Feb 18

Course Overview.
Python to Java
Find and bookmark Java4Python
Read Eclipse and Java
Read Java Bootcamp
Read text, Chapter 1

Lab 0: Installing Java and Eclipse
Feb 21-25

Types, Classes, Loops, IO
Read text, Chapters 2 and 3

Week 2 Feb 28 - March 4

Subclasses and inheritance. Abstract classes.

Java Collections classes. ArrayLists
Read text, Chapter 4


Lab 1: Three Short Java Programs
Week 3 March 7 -11

Data structures. Stacks and queues. Pointers and linked structures.
Read text, Sections 6.5 and 6.6


Lab 2: MyArrayList

Week 4 March 14 - 18

Dynamic structures and linked lists. Algorithm analysis
Read text, Chapter 5


Lab 3: Stacks and Queues
Week 5 March 21 -25 Sorting. Recursion
Exam 1

Lab 4: Linked Structures
Week 6 March 28 - April 1 Dynamic programming. Trees and Binary Search Trees.
Read text, Sections 18.1 to 18.3 and 19.1
  April 4-8 Spring Break; no classes  
Week 7 April 11-15

Maps and Sets. AVL trees.
Read text, Section 19.4

Lab 5: Binary Trees
Week 8 April 18 - 22 Hashing and hashmaps. Markov models
Read text, Chapter 20


Lab 6

Week 9 April 25-29 Priority Queues and Heaps
Read text, Chapter 21
Lab 7: Markov models for text generation
Week 10 May 2 - 6

Graphs and graph data structures.
Topological Sorting
Read text, Section 14.1

Exam 2


Lab 8: Priority Queues

 

Week 11 May 9 - 13 Shortest paths for unweighted graphs
Read text, Section 14.2
Week 12 May 16-20

Other shortest path algorithms
Read text, Sections 14.3 to 14.5

Lab 9: Kevin Bacon Game

 

Week 13 May 23-25 More graph algorithms
Final Exam: Wednesday June 1, 9-11 AM