Bryn Mawr College
CS 206: Data Structures
Fall 2013 - Section 001

Syllabus and Schedule Course Information Text and Software
Course Policies
Reference Links


General Information

Instructor: Jia Tao
E-Mail: jtao@cs.brynmawr.edu
When you e-mail me, make sure you put "CS206" at the start of the subject line to ensure a quicker response.
Website: http://cs.brynmawr.edu/Courses/cs206/fall2013/
Lecture:
Tuesdays & Thursdays, 2:15PM - 3:45PM
Room: Park 349
Open Lab: Wednesdays 4pm - 6pm Park Room 231 (Computer Science Lab)
TAs:
Juliette Klingsberg Tuesdays 4pm-6pm and Fridays 11am-1pm

Course Description: This course will introduce fundamental algorithms and data structures of computer science: sorting, searching, recursion, backtracking search, lists, stacks, queues, trees and dictionaries.  It will also introduce students to the mathematical analysis of algorithms, and provide extensive programming experience in the Java language.  This is the second core computer science course at Bryn Mawr.

Prerequisite: Computer Science 205 or 110, or permission of instructor.


Syllabus and Schedule

This is a tentative syllabus and schedule.  Topics, reading assignments, and due dates are subject to change.
All assignments and projects are due by 11:59:59pm on the day listed.
Java readings are from Head First Java; if you are using a different Java reference it is your responsibility to determine the equivalent readings for the listed topics.

Week Date Topic Reading and Practice Assignments Comments
1
9/3
Course Introduction
Learning the Java Language

Slides from the previous semester:
Intro to Java
Java: Ch.1-3, pg 151

Try these examples in lab:
HelloPrinter.java
Examples on Java identifiers, using variables and arithmetic operators and the assignment operator
VariableAndTypeExamples.java   Change.java
And here are a few things not to do: BadChange.java

Check out the Java API documentation.
For example, look for the String class in the package java.lang. It's pretty overwhelming right now, but soon, the API docs will be your new Best Friend. StringMethodExample.java


9/5
Assignment 1 out
2
9/10 Learning the Java Language

Classes and Objects
Java Tutorial: Classes and objects
(except for the Nested Classes)

Assignment Submission Instructions
9/12
Control Structure:
Analyze Sally's lunch order (in text)
Logic of Sally's order
Assignment 1 due 9/14
3
9/17
Classes and Objects(continued)

Interfaces and Inheritance

Understanding Exceptions (notes)
  • Reporting errors: the throw statement
  • Propagating errors: the throws clause
  • Handling errors: try/catch blocks      
  • Call stack, try/catch/finally and try/finally FirstExceptionTest.java   ExceptionExample.java  
  • Lafore: Ch. 1 page 9-21 and Ch. 2
    Java Tutorial: Numbers and Strings
    Java Tutorial: Packages
    Java Tutorial: Interfaces and Inheritance
    Get familiar with the API of following Java classes:
    String   Math   Integer   Double   Character  

    Examples:
    ScannerTest.java
    Order.java  OrderTest.java  OrderUI.java

    Run and have fun!
    SimpleServer.java   SimpleClient.java  
    Assignment 2 out

    9/19
    Assignment 2 Part 1 due 9/22 9/29

    4
    9/24
    Interface and Inheritance(continued)
  • Class inheritance and polymorphism
  • Abstract classes

  • Using Eclipse
    code review
    Java Tutorial: Interfaces and Inheritance
    Get familiar with the API of following Java classes:
    String   ArrayList   Random  

    Assignment 3 out

    9/26
    Assignment 2 Part 2 due 9/29 10/6

    5
    10/1
    Interface and Inheritance(continued)
  • Dynamic binding
  • The root of Java class hierarchy
  • toString(), getClass(), equals()
  • ArrayList class
  • MyStringList.java
    MyStringListTester.java 


    Intro to the Analysis of Algorithms
    JUnit Tutorial

    Java Practice Problems

    10/3


    6
    10/8
    Analysis of Algorithms and Search

    Examples from the text book:
    Ordered Array
    Exam 1 Topics:
  • Primitive types and strings
  • Using variables
  • Arithmetic operations, integer vs. floating-point math
  • Defined constants
  • Objects and classes
  • Methods, parameters, return values
  • Defining our own classes
  • Instance variables vs. local variables
  • Constructors and methods
  • Access modifiers
  • Control flow statements and boolean expressions
  • Reading input with Scanner
  • Arrays
  • Interfaces and polymorphism


  • Read: Lafore: Ch. 1 page 9-21 and Ch. 2
    Assignment 3 Part 1 due 10/13
    10/10
    Exam 1 is today

    7
    10/15
    Fall break
    10/17
    Assignment 3 Part 2 due 10/20

    8
    10/22
    Exam Review
    Analysis of Algorithms and Search
    Simple Sort

    Examples from the text book:
    Unordered Array
    Ordered Array
    BubbleSort
    InsertSort
    SelectSort
    Read: Lafore: Ch. 2 and Ch. 3 Assignment 4 out
    10/24
    If you have trouble running the textbook examples, refer to the Java security level setting .
    9
    10/29
    Simple Sort (cont.)
    Sorting and Generic Method
    Wild Cards and Bounds
    Collections and Iterators
    Read: The Java Tutorial - Generics
    Assignment 5 out
    10/31
    Assignment 4 due 11/1

    10
    11/5
    Collections and Iterators (cont.)
    Linked Lists

    Read: Lafore: Ch. 5

    11/7


    11
    11/12
    Linked Lists (cont.)
    Stacks

    Sample Code:
    PureStack.java
    ArrayBasedStack.java
    LinkedStack.java
    StackUtil.java
    Read: Lafore: Ch. 5, 6 Assignment 6 out

    11/14
    Assignment 5 due 11/14

    12
    11/19
    Stack Applications
    Queues
    Stack and Recursion
    Trees

    Sample Code:
    ExpressionFormatException.java
    PostfixEval.java


    Assignment 7 out
    11/21
    Assignment 6 due 11/24

    13
    11/26
    The class is canceled because I am out of town.
    11/28
    Happy Thanksgiving!

    14
    12/3
    Trees, Binary Trees, Binary Search Trees

    Assignment 7 due 12/4 12/8
    12/5
    Midterm Exam extra credit due today.
    Assignment 8 out


    15
    12/10

    12/12
    Exam 2 is today!

    Important Dates

    October 10: Midterm
    December 12: Final Exam/Last lecture



    Text & Software

    STRONGLY RECOMMENDED

    Data Structures and Algorithms in Java (2nd edition) by Robert Lafore, Sams, 2002.








    ONE OF THE FOLLOWING JAVA REFERENCES

    Head First Java (2nd edition) by Sierra, Bates, and Bates, O'Reilly, 2005.  Available at the Campus Bookstore.

    The Java Tutorial (4th edition) by Zakhour et al., Sun Microsystems, 2006.  Available for free at http://download.oracle.com/javase/tutorial/.

    Java in a Nutshell (5th edition) by David Flanagan, O'Reilly, 2005.  This is an excellent reference, especially for the Java API, but moves very quickly over the basics.

    Thinking in Java (4th edition) by Bruce Eckel, Prentice Hall.  The first part of the 4th edition and all of the 3rd edition are available for free at http://www.mindview.net/Books/TIJ/.

    I would strongly recommend that you use Head First Java as your primary reference in this course, using the online version of The Java Tutorial as needed.



    SOFTWARE

    Java SE SDK
    This software is already installed in the Computer Science Lab, but you are welcome to install the SDK on your own machines as well.

    Emacs
    This is already installed in the Computer Science lab, and is available for free for your own computer.

    Eclipse
    We won't be using the Eclipse IDE until later in the semester, but it too is available for free.  If you install it on your machine, I recommend the "Eclipse IDE for Java Developers" version.  Be sure to install the Java SDK first, however.




    Course Policies

    Communication

    Attendance and active participation are expected in every class. Participation includes asking questions, contributing answers, proposing ideas, and providing constructive comments.

    As you will discover, I am a proponent of two-way communication and I welcome feedback during the semester about the course. I am available to answer student questions, listen to concerns, and talk about any course-related topic (or otherwise!). Come to office hours! This helps me get to know you. You are welcome to stop by and chat. There are many more exciting topics to talk about that we won't have time to cover in-class.

    Whenever you e-mail me, be sure to use a meaningful subject line and include the phrase "CS206" at the beginning of that line. Your e-mail will catch my attention and I will respond quicker if you do this. I make an effort to respond to e-mails within 24 hours on weekdays and 48 hours on weekends.

    Although computer science work can be intense and solitary, please stay in touch with me, particularly if you feel stuck on a topic or project and can't figure out how to proceed. Often a quick e-mail, phone call or face-to-face conference can reveal solutions to problems and generate renewed creative and scholarly energy. It is essential that you begin assignments and projects early, since we will be covering a variety of challenging topics in this course.


    Grading

    Your grade will be based upon four homework assignments, a three-part project, and two exams.  Assignments must be submitted according to the Assignment Submission instructions.  You should pay careful attention to the Code Formatting Standards and Grading Policy when doing your assignments.  The grading structure for individual assignments is broken down in the Grading Policy.

    At the end of the semester, final grades will be calculated as a weighted average of all grades according to the following weights:

    Exam 1: 15%
    Exam 2: 20%
    Assignments: 65%
    Total: 100%

    Incomplete grades will be given only for verifiable medical illness or other such dire circumstances.


    Submission and Late Policy

    All work must be turned in either in hard-copy or electronic submission, depending on the instructions given in the assignment.  E-mailed submissions will not be accepted.  Extensions will be given only in the case of verifiable medical excuses or other such dire circumstances, if requested in advance.

    Late submissions will receive a penalty of 10% for every 0-24 hours it is past the due date and time (e.g., assignments turned in 25 hrs late will receive a penalty of 20%).  Submissions received more than one week late will not be accepted.  The final project integration will not be accepted late.


    Exams

    There will be two exams in this course.  The exams will be closed-book and closed-notes.  They will cover material from lectures, homeworks, and assigned readings (including topics not discussed in class).  So, keep up with those readings!


    Study Groups

    I want to encourage you to discuss the material and work together to understand it. Here are my thoughts on collaborating with other students:

    If you have any questions as to what types of collaborations are allowed and which are dishonest, please ask me before you make a mistake.


    Electronic Devices

    I have no problem with you using computers or tablets to take notes or consult reference materials during class.  Tempting though it may be, please do not check e-mail or visit websites that are not relevant to the course during class.  It is a distraction, both for you and (more importantly) for your fellow classmates.  Please silence your phones and computers when you enter class.


    Reference Links

    These references will be useful throughout the semester: