What this course is about
CS 2102 is an intermediate-level course on program design. CS 1101/1102 focused
on designing for correct program behavior. In CS 2102, we begin to consider
other design goals - such as efficiency, maintainability, and scalability -
without sacrificing correct program behavior. The course examines interactions
between data structures, algorithms, invariants, and object-oriented code
structure in the pursuit of good program design.
All programming in the course is in Java, but the course does not assume prior
Java experience. While the course covers certain issues specific to Java
and object-oriented programming, the general principles apply broadly to
most programming languages.
CS2102 is not an introductory programming course! The course assumes programming background at the depth of CS1101 (or CS1102). Students who have not had CS1101 or CS1102 should consult with the instructor before attempting the course; you will be responsible for teaching yourself the terminology of those courses at the start of the term.
Additional information about the course
is available in the
WPI undergraduate catalog course description for CS 2102.
Staff
Pictures of CS2102 Course Staff Members
Instructor: Glynis Hamel
Teaching Assistants: Salah Ahmed, Junjie (Homer) Gu, Chiying Wang
Senior Assistants: Chris Botaish, Alex Chen, Ryan Danas, Matt Heon,
Alex Karp, Yilan Liu, Ted Meyer, Nicholas Morin, Saraf Rahman, Fredric Silberberg
Office Hour Schedule
Day/Time |
9:00 |
10:00 |
11:00 |
12:00 |
1:00 |
2:00 |
3:00 |
4:00 |
5:00 |
6:00 |
7:00 |
Sunday |
|
|
|
|
|
|
  |
Matt |
|
|
|
Monday |
Nick |
Chiying |
Alex C, Salah |
Alex K. |
Ryan |
Homer |
Homer |
Matt |
Yilan |
|
|
Tuesday |
Nick |
Glynis |
Salah |
|
Chris |
Chris |
|
Fred |
|
|
|
Wednesday |
|
Ryan |
Alex C. |
Ted |
Ted |
Saraf |
Saraf |
Chris |
Alex C. |
|
|
Thursday |
|
|
|
Saraf |
|
|
|
Matt |
Chiying |
Yilan |
Yilan |
Friday |
Nick |
|
Fred |
Ted |
Ryan |
Glynis |
|
Fred |
|
|
|
Saturday |
|
|
|
|
|
  |
Alex K. |
Alex K. |
|
|
|
TA/SA office hours are in FL A22. Glynis Hamel's office hours are in
FL 132.
Additional office hours with Glynis Hamel are available by appointment on Thursdays.
Announcements, Class Discussion Board and Email
A discussion board for CS 2102 has been set up on myWPI.
You should visit the discussion board and check the Announcements
on a daily basis.
If you have a question regarding your grades in the course, please send email to
cs2102-ta *at* cs.wpi.edu. Mail sent
to this address goes to the instructor and to the TAs. Include your
section number in all correspondence.
The instructor's email address is
ghamel *at* cs.wpi.edu.
Please restrict your use of my personal email address to issues of a
confidential nature. You will get a quicker response if
you post your questions to the class discussion board.
Lecture and Lab Times
Lectures MTRF from 12:00-1:00pm, and from 1:00-2:00pm, in AK 116.
You should attend the lecture for which you are registered.
Labs meet on Wednesdays according to the following schedule:
Section | Time | Location | Lab Assistants |
B01 | 8 - 8:50am | FL A021 | Homer, Nicholas
|
B02 | 12 - 12:50pm | FL A021 | Salah, Matthew
|
B03 | 1 - 1:50pm | FL A021 | Salah, Saraf
|
B04 | 2 - 2:50pm | FL A021 | Salah, Fredric
|
B05 | 3 - 3:50pm | FL A021 | Salah, Christopher
|
B06 | 4 - 4:50pm | FL A021 | Salah, Yilan
|
B07 | 11 - 11:50am | FL A021 | Homer, Alex Karp
|
B08 | 3 - 3:50pm | SL 123 | Homer, Ted
|
B09 | 4 - 4:50pm | SL 123 | Homer, Alex Chen
|
B10 | 5 - 5:50pm | FL A021 | Homer, Ryan
|
Textbook and Software
Textbook There is no required textbook for this course. Professor
Kathi Fisler has written a set of companion notes to the lectures that will be
available as reference/reading material for this course. If you are intending to continue programming in Java beyond this course (e.g., CS, IMGD Technical, or RBE majors), we recommend
Effective Java by Joshua Bloch as an additional text. The syllabus references sections of this book for additional perspective; you will not be tested on material that appears solely in this book though.
Software: You may use either DrJava or Eclipse for this course. Eclipse has a much higher learning curve, but is used in upper-level CS courses (such as Software Engineering) and software-based jobs. If you are not going on to upper-level CS courses or if you prefer a gentler introduction to Java, we recommend DrJava. You are welcome to start in DrJava then switch to Eclipse mid-term. Lectures will use DrJava for demonstrations.
The DrJava documentation includes a useful QuickStart guide. Chapter 3 is enough to get you started once you have the software installed.
Separate instructions explain how to use the testing library with either programming environment.
Grading
Exams (20% each, total 40%)
Two exams will be given. Exams are tentatively scheduled for Thursday,
November 21
and Thursday, December 19. You must have a passing average on
the exams in order to pass the course. (A passing average on the exams
is usually around 60%. We may lower this threshold if the exam averages
are low; the threshold will not be raised).
Exams are closed-book, closed-notes. You may bring in one sheet of
notes (one paper, 8.5" x 11.5", both sides) to each exam. You may not use
any computers, calculators, cellphones, or other electronic devices during the exams.
There are no makeups for exams. Absence from an exam will be
excused only for medical or emergency reasons. In such cases your final
grade will be recorded as Incomplete and you will be allowed to take a makeup
exam the next time the course is offered (D-term 2014).
Quizzes (20%)
Unannounced in-class quizzes will be given throughout the term. The quizzes are designed to test your understanding of recent lecture material and reading. Quizzes will consist of two or three questions focused on a
topic from that week's lectures/reading. Your two lowest quiz grades will be dropped.
There are no makeups for quizzes.
Homework (35%)
Six homework assignments will be given.
Homework assignments will be done in pairs. Homework assignments will be due on Tuesday
evenings at 5pm. No extra credit or makeup assignments will be given.
All homework will be electronically submitted and
will be due at 5pm on the due date. No extra
credit or makeup assignments will be given.
Labs (5%)
Labs will be given during conference
sections on Wednesdays.
To get credit for a lab you must attend at your scheduled time,
actively work on the assignment during the lab period, and use
web-based turnin to turn in your work at the end of the lab
period. Each lab
will be graded as either credit (1) or no credit (0).
You will
not get credit for a lab unless you attend the section for which you
are registered. Your lowest lab grade will be dropped. There are no makeups for labs.
Note that
each student is allowed to miss a number of labs/quizzes with no questions asked. Do not send email to the instructor or to the
TAs requesting makeup or extra-credit work.
Academic Honesty Policy
Please read WPI's Academic
Honesty Policy.
Labs
Collaboration is encouraged for labs.
Exams and Quizzes
Exams and quizzes are to be done individually.
Homework
All homework assignments will be done with a partner. You may discuss problems across
homework pairs, but each pair is responsible for writing up their own solution
from scratch.
As examples, each of the following scenarios would constitute
cheating (this list is not exhaustive!):
- Two different homework pairs share a solution to a
single question on a homework assignment.
- Students from different homework pairs sit side-by-side while
writing up their solutions and one student copies down what the other
student types up.
- You send the code for a completed homework question to a friend
in another homework pair "just so he can look at it to figure out how
to do the problem".
- You obtain a solution to a homework problem (or a problem similar
to a homework problem) from on-line or from someone who took the
course in a previous term.
In contrast, the following scenarios would not constitute
cheating:
- Students from two different homework pairs discuss a
pair-assignment (its goal, what it is asking you to do, what the
challenging parts are, or how to approach the problem).
- You ask any member of the course staff (professor, TAs, or SAs)
for help in understanding or completing an individual assignment.
- Students from the same homework pair share code to a solution.
- Students from one homework pair show their code to a student from
a different pair and ask for help in understanding why their code is
wrong. (This would become cheating if the non-pair student provided
or dictated a reasonable amount of the solution to the original pair).
Cheating will not be tolerated.
If
you are unsure whether a given activity would constitute cheating, ask
the instructor.
Violations of the Academic Honesty
Policy can result in an NR for the course, and violators will be
subject to the procedures outlined in section 5 of the
WPI Judicial
Policy.
Late Policy
Late homework will be accepted within 24 hours of the due date. Each student will be allowed one late submission without penalty. Beyond that, late homework will incur a 25 per cent penalty. Any homework turned in after the 24-hour grace period will receive a grade of zero. No extra credit or makeup homework assignments will be given.
Do not send email to the instructor or to the TAs requesting special exemption from the late policy. The late policy is applicable for all possible reasons for late submissions. In particular, one pair member forgetting to turn in an assignment will not be considered an acceptable excuse for an extension.
Homework Submission Policy
Read Expectations on Preparing Homework.
Homework must be submitted using the web-based
turnin program.
Homework
submitted by any other means (paper, email, etc.) will receive a grade
of zero.
Students with Disabilities
Students with disabilities who believe that they may need
accomodations in this class are encouraged to contact the Disability
Services Office (DSO) as soon as possible to ensure that such
accomodations are implemented in a timely fashion. The DSO is
located in Daniels Hall.
Schedule
Note: the instructor reserves the right to change the order of topics
or the dates of the exams, if necessary.
Week |
Notes and Readings |
Topics |
Assignments
|
Oct 29 - Nov 1 |
Lecture 1 objectives
Lecture 2 objectives
Lecture 3 objectives
Notes for lectures 1 - 3 (Racket to Java)
Friday's code on family trees
|
Migrating to Java
Interfaces
Trees
|
Homework 1 (due: Tuesday, Nov 5 at 5pm)
Lab 1 (new to Java), Wed 10/30
Lab 1 (know Java), Wed 10/30
|
Nov 4 - 8 |
Lecture 4 objectives
Lecture 5 objectives
Lecture 6 objectives
Lecture 7 objectives
Notes
for lecture 4 (Abstract classes)
pptx|
pdf
Notes
for lecture 5 (Abstract Data Types)
Notes
for lecture 6 (Data Structures for Sets)
Notes
for lecture 7 (implementing BSTs)
More
notes
for lecture 7 (BSTs as ISets)
An example to motivate the use of Interfaces over Abstract Classes
Extra: a gentle introduction to removing type questions
|
Abstract Classes
Abstract Data Types (ADTs)
Implementations of an interface for Sets
Binary Search Trees
AVL Trees
|
Lab 2, Wed 11/6
Homework 2 (due: Tuesday, Nov 12)
|
Nov 11 - 15
|
Lecture 8 objectives
Lecture 9 objectives
Lecture 10
objectives
Lecture 11
objectives
Notes for
Lecture 8 (Heaps)
Recap: lectures 1 - 9
Notes for lecture 10-11 (Data Abstraction)
Answers to the "essay" questions on Quiz 2
Answers to the "essay" questions on Quiz 3
|
Heaps
Abstract methods
Abstracting over data using the Object class
Abstracting over data using generics
Bounded generic parameters
|
Lab 3, Wed 11/13
Homework 3 (due: Tuesday, Nov 19)
|
Nov 18 - 22 |
Lecture 12
objectives
Lecture 13 - review
Lecture 14 - Exam date
Lecture 15
objectives
Notes
for Lecture 12 (Method Abstraction)
Notes for lectures 15-16 (Visitors)
Java API
Last year's Exam 1(pdf file)
Why aren't the answers to the Sample Exam published?
A set of solutions (and grading rubric) for Exam 1
|
Abstracting over behavior
Catch up/exam review
Exam 1 November 21
Method abstraction over class hierarchies
|
Lab 4, Wed 11/20
Homework 4 (due: Tuesday, November 26 December 3)
|
Nov 25 - 26 |
Lecture 16
objectives
Lecture 17 objectives
Notes for lecture 17 (Hashtables and Java HashMaps)
How to Write an Equality Method in Java
Answers to Quiz 4
|
More about visitors
Memoization
Hash Tables
equals() and hashCode()
|
(no lab this week)
|
Dec 2 - 6
|
Lecture 18
objectives
Lecture 19 objectives
Lecture 20 objectives
Lecture 21 objectives
Notes for Lecture 18 (Java LinkedList and for-loops)
Notes for lecture 19 (Encapsulation)
Notes for lecture 20 (Exceptions)
Notes for Lecture 21 (Intro to Graphs)
Set of solutions to Quiz 5
|
LinkedLists and for-loops
Encapsulation
Exceptions
Introduction to Graphs
|
Lab 5 Wed, 12/4
Homework 5(due: Tuesday, December 10)
|
Dec 9 - 13 |
Lecture 22 objectives
Lecture 23 objectives
Lecture 24 objectives
Lecture
25 objectives
Notes for Lecture 22
(Terminating programs on graphs)
Notes for Lecture 23 (Finding routes)
Notes for Lecture 24 (Encapsulating routes)
complete graph code with encapsulated routes
Sample Exam 2 (pdf file)
Handout for sample exam
|
Terminating Programs on Graphs
Graphs: Returning routes
Graphs: Encapsulating Routes
ArrayList, Stacks and Queues
|
Lab 6 Wed, 12/11
Homework 6
(due: Tuesday, December 17)
|
Dec 16 - 19
|
Lecture 26 objectives
Lecture 27 objectives
Lecture 28 - Exam date
A set of solutions (and grading rubric) for Exam 2
Notes for Lecture 26 (Mutation)
More notes for Lecture 26 (Mutation)
Notes:
What have we learned?
|
Memory and Mutation
Perspective and Wrap Up
Exam 2 December 19
|
|
Frequently Asked Questions (FAQs)
- Where can I find feedback on my homework assignments?
A grade sheet will be filled out for every graded homework assignment.
The grader will upload a copy of the grade sheet to the turnin accounts
of both homework partners. You can access the grade sheet for a
particular assignment by choosing the assignment in turnin, and
clicking on the "Comments" submitted by the grader for the assignment.
- My classmate has received her homework feedback on turnin, but my feedback isn't posted. Why?
There is a staff of 13 people grading CS 2102
homework assignments. The graders will be uploading your feedback as soon
as they can, but expect that the feedback will be available at different times from different graders.
We'll try to guarantee that the feedback for any given assignment will be posted within a week of the
due date.
- What should I do if I think my assignment has been graded incorrectly?
The feedback sheet for each homework assignment gives the name and
email address of the assistant who graded your assignment. Contact
that person first.
- When will I get my graded quizzes back?
Graded quizzes will be
returned on Wednesdays during lab sections.
- Where are TA/SA office hours held?
The TA office hour room is FL A22, in the sub-basement of Fuller Labs.
The sub-basement is the bottom-most level of Fuller. Follow the signs
to the "Zoo Lab", which is next door to the office hour room.

http://www.cs.wpi.edu/~cs2102/b13/index.html