CS 2112/ENGRD 2112 is an honors version of CS 2110/ENGRD 2110; credit is given for only one of CS 2110 and 2112. Transfer between CS 2110 and 2112 (in either direction) is encouraged during the first three weeks. We cover intermediate software design and introduce some key computer science ideas. The topics are similar to those in CS 2110 but are covered in greater depth with more challenging assignments. Topics include object-oriented programming, program structure and organization, program reasoning using specifications and invariants, recursion, design patterns, concurrent programming, graphical user interfaces, data structures, sorting and graph algorithms, asymptotic complexity, and simple algorithm analysis. Java is the principal programming language.
Time & Place
Lecture: Tuesdays and Thursdays, 10:10-11am,
Labs: Mondays 7:30-8:20pm, Phillips 219 or Wednesdays 7:30-8:20pm, Hollister 110
Recitations: Tuesdays 12:20-1:10pm, Gates G01 or Wednesdays 1:25-2:15pm, Hollister 110
You are expected to attend all the lectures and one lab and one recitation per week.
Placeholder for staff
Office Hours Weekly Chart
|10 - 11 am
12.15 - 1.15 pm
6 - 7 pm
|11 am - 12 pm
1 - 2.30 pm
7 - 8 pm
|2 - 3 pm
5 - 6 pm
6 - 7 pm
|11 am - 12 pm
3 - 4 pm
5.30 - 6.30 pm
|9 - 10 am
1 - 2 pm
1.45 - 3.15 pm
4 - 5 pm
Very good performance in CS 1110 or CS 1130 or an equivalent course, or permission of the instructor. If you are unsure whether CS 2110 or CS 2112 is the right course for you, please talk to the instructor of either course. Both courses cover similar material and satisfy the same requirements, but CS 2112 covers material in more depth and has more challenging assignments. It is aimed at computer science majors.
You are required to read the course notes posted on the web site. These will often contain more detail than what was presented in lecture.
There is a recommended textbook, which is also the textbook for CS 2110. It is useful especially for examples of how to implement various data structures.
- Data Structures and Abstractions with Java, 4th edition, Frank M. Carrano and Timothy Henry, Pearson Education, 2014. ISBN-10: 0133744051, ISBN-13: 9780133744057.
See also the companion website for additional material.
- Data Structures and Problem Solving Using Java, 3rd edition, Mark Allen Weiss, Addison Wesley, 2006. ISBN 0-321-32213-4. See also Weiss's website for additional material. A required text from previous years.
- Program development in Java: Abstraction, Specification, and Object-Oriented Design, B. Liskov and J. Guttag, Addison-Wesley, 2000. ISBN 0-201-65768-6. An excellent source of material on designing and specifying abstractions.
- Java Precisely, 2nd edition, P. Sestoft, MIT Press, 2005. To access the entire book for free, login via the Cornell Engineering Library.
- Design Patterns, Erich Gamma, Richard Helm, Ralph Johnson, and John M. Vlissides, Addison Wesley, 1994. ISBN 0-201-63361-2. An extremely influential book on software engineering. According to Wikipedia, as of April 2007, the book was in its 36th printing and has sold over 500,000 copies in English and 13 other languages.
- Java in a Nutshell, 5th edition, David Flanagan, O'Reilly, 2005. ISBN 0-596-00773-6.
These titles are on reserve in the Engineering library, Carpenter Hall.
The CS 2110 website has many online learning aids and tutorial videos.
Grading and submission policies
There will be 7 assignments, mostly involving programming but also some written problems. These assignments will make up 40% of your score. The first 2–3 assignments will be done solo; the final project will be done with a partner.
Unless otherwise specified, assignments may be turned in late with a deduction of 10% per day up to a maximum of four days (Saturday and Sunday count as one day).
Extensions are granted in case of illness or other acceptable excuse.
There will be one evening prelim and a final exam. Please check the schedule page for times and locations.
The prelim will be 20% of your score and the final will be 35%.
We expect you to participate in class and elsewhere. In addition to attending lectures, all students should enroll in and attend one lab and one recitation per week. It doesn't matter which. The remaining percentage of your grade will be for class participation (in-class, Piazza, course evals) and for in-class quizzes.
Placeholder for schedule
- Course notes
- Java language
- Java version
- Interactive development environments (IDEs)
- Useful libraries
- Programming advice and resources
- Computer labs
- Support services
- CS 2110 Resources
This course uses Java, for several reasons. Java is the most widely used object-oriented programming language, and Java programming skill is in high demand. Java is also a good vehicle for explaining many of the software engineering ideas that will be covered in the course. Java is occasionally a bit verbose. However, most of the ideas you will be exposed to in this course, and the skills you will develop, will transfer to other programming languages.
• Prof. Gries has written a summary of Java that may be helpful to those encountering Java for the first (or second) time: Java Summary.
• The Java API is very useful for learning how to use the many existing Java class libraries.
• The Java Language Specification is helpful if you want to really understand how Java works.
For students with limited Java experience, we recommend the online notes from CS 1130, Transition to Object-oriented Programming as a refresher. This is a self-paced course consisting of several modules that you can go through at your leisure.
Review the introductory chapters in the textbook and the Java reference books listed on the course info page.
See Oracle's official Java Tutorial.
For students with C++ experience, see this comparison of C++ with Java.
We will the use the Java 8 Standard Edition (Java SE 8) platform, which consists of the Java Development Kit (JDK) and the Java Runtime Environment (JRE). If you are using Java 7 or earlier, please upgrade.
To find out which version of the Java Runtime Environment (JRE) you are
running, open a command window (in Windows, Start > Run... and type
and in Mac OS X, Applications > Utilities > Terminal)
java -version at the command prompt:
$ java -version java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
This says I have version 8 installed (8 and 1.8 are synonymous).
If you are on a PC running Windows and have never installed a version
of the Java Development Kit (JDK) on your machine, you probably don't have it.
If you are on a Mac, you probably do. To find out, type
$ javac -version javac 1.8.0_77
If you get an error message or the version is earlier than 1.8, you must (re)install the JDK.
Installing the JDK
The JDK is already installed in CIT and ACCEL labs. However, installing it own your own machine will greatly facilitate your work. Please note that you should double check your work in a public lab, as privately owned machines occasionally exhibit different behaviors.
To download the JDK, visit Oracle's Java web site and download and install the appropriate version of the JDK 8 for your platform.
Compiling and Running from the Command Line
Say your main class is
MyProgram and it is
contained in the source file
If it is not in a package, navigate
to the folder containing
If it is in a package (say
source should be in a folder called
to the folder containing
From the same folder you compiled from, type
java MyProgram <program arguments> if it is not
in a package, and
java myPackage.MyProgram <program arguments> if it is.
Specifying a Classpath
Sometimes you may need to inform Java where to find auxiliary
classes. You can do this with the
Supply a sequence of folders telling Java where to look
for classes, separated by
: (Mac) or
There are some basic Java utilities specifically for CS 2110 that you
may find useful. These are contained in a package
edu.cornell.cs.cs2110 contained in a
.jar file which you can download from here.
Follow the installation instructions on that page.
Javadoc documentation is also available.
IDE stands for integrated development environment. The use of an IDE is the best way to develop Java programs. IDEs provide many valuable aids such as syntax checking, debugging, and refactoring that can save you a lot of effort.
There are many good IDEs. We recommend Eclipse, but you may use any one that you like, or none at all. Eclipse is installed in all the labs, along with some others. Early recitation sections will get you started with Eclipse if you are not familiar with an IDE.
Here are some links:
Some Java libraries have been developed for use in CS 2112 assignments. Use of these libraries is generally allowed, but not required.
There are many valuable resources that can help you take your programming skills to the next level. Here are a few links:
Software Development Methodologies
Just for Fun
- How not to program
- Teach Yourself Programming in Ten Years
- Quines (Self-Reproducing Programs)
- Powers Of Ten
- Programming Quotes
- How To Become A Hacker
- How To Write Unmaintainable Code
- History of Operator Precedence
- Software Bugs & Glitches
- Doom for System Administration
- The International Obfuscated C Code Contest
- The Easter Egg Archive
- OOP Criticism
- Esoteric Programming Languages
Cornell Information Technologies (CIT) runs several computer labs across campus for all members of the Cornell community. The JDK and Eclipse are installed on these machines. Check here for locations and times of operation.
You can also find the course software in the Academic Computing Center (ACCEL), located in the Engineering Library in Carpenter Hall. Any CS student may register for an account.
Academic Excellence Workshops
The Academic Excellence Workshops (AEW) offer an opportunity for students to gain additional experience with course concepts in a cooperative learning environment. Research has shown that cooperative and collaborative methods promote higher grades, greater persistence, and deeper comprehension. The material presented in the workshop is at or above the level of the regular course. We do not require joining the AEW program, but do encourage students to join if they are seeking an exciting and fun way to learn. The AEW carries one S/U credit based on participation and attendance. The time commitment is two hours per week in the lab. No homework will be given. This is a wonderful opportunity for students to seek extra help on course topics in a small group setting.
Your fellow undergraduate students, who are familiar with the course material, teach the sessions with material that they prepare. The course staff provide guidance and support but do not actually teach the AEW course content or any session. A representative from the AEW program will be speaking about the program and registration procedures in lecture.
One of your TAs will be designated as the AEW liaison for CS 2112. Watch the announcements to find out who.
See the AEW webpage for further information.
Other Support Services
|Student Resources For Engineering Students||This site has links to a variety of services.|
|Free Computer Training||CIT offers free computer training throughout the semester. Email email@example.com for an appointment.|
|Student Web Services||This website collects services that are more general.|
|Engineering Advising||Academic advising for engineering students.|
|Arts College Student Services||A listing of general support services for a variety of concerns students may have.|
|Tau Beta Pi||Tau Beta Pi Engineering Honor Society Tutoring Program. The members of Tau Beta Pi are selected for their academic aptitude and social commitment. They hold one-on-one tutoring sessions with students in courses that typically have a large enrollment of engineers.|
|Learning Styles||Not everyone learns the same way. If you are curious about how you learn, check out this collection.|
|Gannett||The Cornell University Health Service Center. For all health related concerns.|
|CAPS||If you are experiencing emotional distress, we urge you to contact CAPS, the Counseling and Psychological Services.|
|Dear Uncle Ezra||When all else fails, ask Uncle Ezra!|
All source code will be available on CMS.
- Assignment 1: Introduction to Java and object-oriented languages
- Assignment 2: Ciphers and Encryption
- Assignment 3: Data Structures and Text Editing
- Assignment 4: Parsing and Fault Injection
- Assignment 5: Interpretation and Simulation
- Assignment 6: Graphical User Interface Design
- Assignment 7: Distributed and Concurrent Programming