CS112 Introduction to Programming (Spring 2012) [an error occurred while processing this directive]: Course Info

   Home   –   Overview   –   Schedule   –   Assignments   –   BookSite (stdlib)   –   Help  

General Information

CS112 Introduction to Programming (Spring 2012)

DL 220, MWF 11:35-12:25

Zhong Shao, 314 AKW, 432-6828, zhong DOT shao AT yale DOT edu
Office Hours: MW 4-5pm (314 AKW)

Teaching Fellows:  
Pedro Alves:   pedro DOT alves AT yale DOT edu
Thaddeus Diamond:   thaddeus DOT diamond AT yale DOT edu
Michael Hopkins:   michael DOT hopkins AT yale DOT edu
Yitzchak Lockerman:   yitzchak DOT lockerman AT yale DOT edu
Michael (Fitz) Nowlan:   michael DOT nowlan AT yale DOT edu
Aaron Segal:   aaron DOT segal AT yale DOT edu
Fei Xue:   fei DOT xue AT yale DOT edu
(Bobby) Jun Zhou:   jun DOT zhou AT yale DOT edu

Peer Tutors:
Christian Eubank:   christian DOT eubank AT yale DOT edu
Mainak Ghosh:   mainak DOT ghosh AT yale DOT edu
Vladimir Kirimov:   vladimir DOT kirimov AT yale DOT edu
Andrew O'Donnell:   andrew DOT odonnell AT yale DOT edu
Xiao Shi:   xiao DOT shi AT yale DOT edu
Michael Tan:   michael DOT tan AT yale DOT edu
Daniel Tay:   daniel DOT tay AT yale DOT edu
Ngozi Ukazu:   ngozi DOT ukazu AT yale DOT edu


CS 112 is an introductory programming course, using the Java programming language. There is no prerequisite for the course -- in particular, no prior programming experience is required -- although it helps to be "computer literate."

By the end of the course you should be able to write useful Java programs.  But the focus of the course is programming concepts, so besides learning how to write cool artifacts you will also learn things like object-oriented programming (classes, methods, objects, etc.), control structures (conditionals, looping, recursion, etc.), data types (arrays, strings, numbers, lists, queues, stacks, etc.), basic algorithms (sorting, searching, etc.), and some advanced ideas (exception handling, input/output streams, etc.).

The purpose of this course is to teach the fundamentals of programming, not Java, not object-oriented programming, and not graphical user interfaces. What you learn will be applicable to all future programming tasks you may encounter. Nonetheless, Java will be the primary language we use in the class.

Textbooks and Materials

The required textbook is:

  • Robert Sedgewick and Kevin Wayne. Introduction to Programming in Java: An Interdisciplinary Approach 2008. URL: http://introcs.cs.princeton.edu/java/home/
  • The following book is *not* required but it is recommended to those who prefer a slower-paced (and more verbose) introduction to Java:

  • Stuart Reges and Marty Stepp. Building Java Programs: A Back to Basics Approach (2nd ed.) March 2010. URL: http://www.buildingjavaprograms.com/
  • A few additional good Java books include:

  • A great book for post-cs112 Java learning is Thinking in Java (4th Edition) by Bruce Eckel, Feb. 2006, by Prentice Hall. The newest version is version 4, but the 3rd version is good enough for most of us, and free available online at: http://www.mindviewinc.com/Books/downloads.html.
  • Another good book is: Java Examples in A Nutshell (3rd Edition) by David Flanagan, Jan. 2004. See http://safari.oreilly.com/?XmlId=0-596-00620-9 (you can access the book online if you are using an Yale IP address; i.e., on Yale campus or use Yale VPN).
  • Additional course materials will be available "on-line," as described below:

  • Homework and Grading.  All homework assignments will be available on-line, demonstrated in class, handed in electronically by the students, graded on-line, comments mailed electronically to students on-line, and grades posted on-line for each student to review.
  • Class Lectures.  Class lectures will be conducted on-line, using the projection facilities in the classroom.  The instructor will be able to demonstrate Java programming concepts, and respond interactively to student questions. The professor's real-time lecture notes will be available in the lecture log, possibly polished a bit.
  • Software Library.  There will be an on-line class library, which contains special software for the course, and example programs from the textbook. Students will usually be able to try out a program from the book without having to type it in from scratch.

  • Grading

    There will be weekly or biweekly homework assignments -- about 9 or 10 in all.  For the most part, these will be computer programs written in Java.  See the Collaboration Policy below.

    Grading will be based not just on whether your program runs or not, but also on how well it is written: it should be well-structured, documented, and generally easy for someone else to read and understand.  In other words, the style of your program is important.

    Each homework assignment will be given equal weight. We will have two exams; each counts twice points as those of a homework assignment.

    Late-Assignment Policy

    Assignments must be turned in by the specified date and time. For an extension of this deadline, you must have a dean's excuse. Cases of incapacitating illness followed by miraculous recovery before the end of the term are negotiable.

    An assignment that is more than three days late will not be accepted. Extra credit is not accepted after the due date.

    If an assignment is late but not more than three days late, a penalty will be taken on the final grade of the assignment, if your allocation of lateness points has been used up. Each assignment has a 3-hour grace period. Late assignments are assesed on a 4-point penalty per day or partial day (assume each assignment is worth 20 points): 0-3 hours late (no penalty), 3-24 hours late (4 points), 24-48 hours late (8 points), 48-72 hours late (12 points). Your first 20 lateness points are automatically waived.

    Collaboration Policy

    Programming, like composition, is an individual creative process. Individuals must reach their own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write the code that solves the problem, such discussions are no longer appropriate -- the program must be your own work (though you may ask teaching assistants or peer tutors for help in debugging).

    Do not, under any circumstances, copy another person's program. Writing code for use by another or using another's code in any form violates the University's academic regulations and will be dealt with harshly. We will carefully screen programs for evidence of copying, using a combination of automated tools and human eyeball.


    Attendance at lectures is expected but will not be recorded. Students are, however, fully responsible for all material presented in lectures, even if some of it does not appear in the "official" lecture notes. Class attendance is recommended strongly.

    Keeping In Touch

    We will use the Piazza forum server as well as the Yale class server to keep in touch. Piazza offers a quick way to interact with your instructors, TAs, peer tutors, and your fellow students. To sign up, please go to the following site:


    If your question is more like "What in the world does this homework assignment mean?" or "Help!", come see us in person.

    You should read the course home pages rather frequently as they appear for important information, such as lecture notes, instructions on submitting your assignments, clarifications and hints, last minute schedule changes, etc.

    Copyright (c) 2000-2012 Zhong Shao, Richard Yang, Daniel Abadi, Drew McDermott, and Paul Hudak, Department of Computer Science, Yale University